Complete the code to start a for loop over the list 'tables'.
{% for [1] in tables %}
SELECT * FROM [1]
{% endfor %}In dbt Jinja, the variable name in the for loop should be a single item, like 'table', not the list itself.
Complete the code to output the table name inside the loop.
{% for table in tables %}
SELECT * FROM {{ [1] }}
{% endfor %}Inside the loop, use the loop variable 'table' to refer to the current table name.
Fix the error in the loop syntax to correctly iterate over 'columns'.
{% for col [1] columns %}
{{ col }}
{% endfor %}The correct syntax for a for loop in Jinja is 'for variable in list'.
Fill all three blanks to create a dictionary comprehension that maps columns to their types if type is 'string'.
{% set col_types = { [1]: [2] for [3] in columns if columns[[3]] == 'string' } %}The key is the column name 'col', and the value is its type 'columns[col]'.
Fill all three blanks to create a loop that builds a SQL SELECT statement with dynamic columns and tables.
{% set select_cols = ', '.join([[1] for [2] in columns]) %}
SELECT {{select_cols}} FROM [3]We use 'col' as the variable in the list comprehension and loop, and 'table' as the table name.