-
Notifications
You must be signed in to change notification settings - Fork 167
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
24c46a1
commit de9269f
Showing
7 changed files
with
114 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
{% macro get_snapshots() %} | ||
{% set dbt_snapshots_relation = ref('elementary', 'dbt_snapshots') %} | ||
{%- if elementary.relation_exists(dbt_snapshots_relation) -%} | ||
{% set get_snapshots_query %} | ||
with dbt_artifacts_snapshots as ( | ||
select | ||
name, | ||
unique_id, | ||
owner, | ||
tags, | ||
package_name, | ||
description, | ||
meta, | ||
materialization, | ||
database_name, | ||
schema_name, | ||
depends_on_macros, | ||
depends_on_nodes, | ||
original_path as full_path, | ||
path, | ||
patch_path, | ||
generated_at, | ||
unique_key, | ||
incremental_strategy | ||
from {{ dbt_snapshots_relation }} | ||
) | ||
select * from dbt_artifacts_snapshots | ||
{% endset %} | ||
|
||
{% set snapshots_agate = run_query(get_snapshots_query) %} | ||
{% do return(elementary.agate_to_dicts(snapshots_agate)) %} | ||
{%- endif -%} | ||
{% endmacro %} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters