Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

macro to join whole schema into 1 table based on key columns #4

Merged
merged 1 commit into from
Oct 4, 2021

Conversation

bjornj12
Copy link
Contributor

@bjornj12 bjornj12 commented Oct 4, 2021

Macro
join_schema_into_table receives takes in schema_name, event_name_column, event_version_column, event_date_column and creates a table where it joins together all tables in schema_name into 1 table using the 3 key columns

Removed parse.sql as it had nothing special in it, PR #3 will be overriding that later when we keep going on that.

Added a table materialization on the test_model so we get a new table with the result from the macro

Copy link
Member

@logason logason left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

{% endmacro %}


{% macro join_schema_into_table(raw_event_schema, event_name_column, event_version_column, event_date_column) %}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is raw_event_schema the name of the dataset that contains your raw event tables if you're using BigQuery?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ye, dbt referes to it as "schema" but bigquery as dataset, a bit confusing

@bjornj12 bjornj12 merged commit bff273b into master Oct 4, 2021
@bjornj12 bjornj12 deleted the join-event-schema-into-table-for-volume-audit branch October 4, 2021 11:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants