How to add a line break in Jinja String

I am using an array to output a list of items and would like to split them with ’ and ’ & line-break.

I tried like {{my_macro(my_input_var)|join(’ and \n ')}} but it only prints “\n”

What works actually is:
{{my_macro(my_input_var)|join(’ and
However that does not look very nice and I was wondering if there is not a special command/character I could use?

your approach is working fine. Which dbt version you are using?


This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.