2024-01-16 - Change Rules - Using a View as an ‘Input Table’¶
Problem¶
If we are using a consume view in the given , pattern needs to check if its a view and clasify the ‘input type’ as a view in jinja to check for key and/or effective date (may not exists if the view is a metric)
Otherwise we’re defaulting to an input type of table which isn’t always correct.
Solution¶
Small tweak to the jinja template , check if our source has an effective date, if it doesn’t then exclude from the generated sql
{% if "effective_date" not in config.source_columns|lower %}
{# 04.01.2024 - bugfix for view on view with no effective date #}
{{ " WHERE 1=1 " }}
{%- else -%}
Leverage the Magic¶
Our jinja templates which contain all the source to target patterns used to generate efficient BigQuery sql for creating and refreshing tables
Last Refreshed¶
Doc Refreshed: 2024-05-23