You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This happens when referencing other metabase questions in metabase
In the metabase exposures yml here is an extract of a problematic line
exposures:
- name: my_vizdescription: "### Visualization: Table\n\nSee https://example.com/xx\n\\n#### Query\n\n```\nwith \nappointments as (\n select * FROM `xxxx.fct_appointments`\\ \n),\nusers as (\n select * from {{#161}}\n where last_active_at_cache >\\ timestamp_sub(current_timestamp, interval 365 DAY)\n),\napts as (\n SELECT\
I believe dbt tries to interpolate the metabase question references as jinja expression, thus causing problems
jinja2.exceptions.TemplateSyntaxError: unexpected char '#' at 276
line 13
select * from {{#161}}
This is likely to cause problems with every metabase custom variable/reference wrapped under {{}}
Is there a way to either post-process the exposures.yml to escape those characters, or find a way to disable dbt jinja interpolation for metabase exposures ?
The text was updated successfully, but these errors were encountered:
This issue is pretty huge, because it also affects your ability to dbt compile after creating an exposures file in your models/ directory. We get the following error when running dbt compile after successfully creating models/exposures.yml:
Compilation Error
expected token 'end of print statement', got ':'
line 8
{{snippet: NameOfSnippet}}
Edit: There are two issues with this {{}} template string, the : and the whitespace between non-whitespace characters, which are both standard for snippets in Metabase. Adding a post-processing step to fix this file is non-trivial... the fact that exposures can create invalid yaml seems like a big issue.
This happens when referencing other metabase questions in metabase
In the metabase exposures yml here is an extract of a problematic line
I believe dbt tries to interpolate the metabase question references as jinja expression, thus causing problems
This is likely to cause problems with every metabase custom variable/reference wrapped under
{{}}
Is there a way to either post-process the exposures.yml to escape those characters, or find a way to disable dbt jinja interpolation for metabase exposures ?
The text was updated successfully, but these errors were encountered: