Table Of Contents
Table Of Contents

2024-01-16 - Change Rules - Using a View as an ‘Input Table’

Release

Status: Available

Type: Bug-Squash

Date: 2024-01-16

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-03-02