Skip to content

Commit

Permalink
feat(dbt): add dagster dbt package
Browse files Browse the repository at this point in the history
  • Loading branch information
rexledesma committed Feb 9, 2024
1 parent 8d20051 commit 66d55d1
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
target/
dbt_packages/
logs/
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
name: "dagster"
version: "0.0.1"
config-version: 2

require-dbt-version: [">=1.5.0", "<2.0.0"]

macro-paths: ["macros"]

clean-targets: ["target", "dbt_packages"]
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{% macro dagster__log_columns_in_relation() %}
{%- set columns = adapter.get_columns_in_relation(this) -%}
{%- set table_schema = {} -%}

{% for column in columns %}
{%- set serializable_column = {column.name: {'data_type': column.data_type}} -%}
{%- set _ = table_schema.update(serializable_column) -%}
{% endfor %}

{% do log(tojson(table_schema), info=true) %}
{% endmacro %}

0 comments on commit 66d55d1

Please sign in to comment.