Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -21,3 +21,4 @@ env.sh
pyproject.toml

.DS_Store
*.duckdb
3 changes: 2 additions & 1 deletion integration_test_project/models/microbatch.sql
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,8 @@
partition_by = {
'field': 'store_name',
'data_type': 'text',
}
},
tags = ['microbatch']
)
}}

Expand Down
3 changes: 2 additions & 1 deletion integration_test_project/models/microbatch_transaction.sql
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
{{
config(
materialized = 'table',
event_time = 'transaction_ts__hourly'
event_time = 'transaction_ts__hourly',
tags = ['microbatch']
)
}}

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
{{
config(
materialized = 'view',
tags = ['microbatch']
)
}}

Expand Down
4 changes: 4 additions & 0 deletions integration_test_project/profiles.yml
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,10 @@ dbt_artifacts:
dbname: postgres
schema: public
threads: 8
duckdb:
type: duckdb
path: "test.duckdb"
threads: 1
sqlserver:
type: sqlserver
driver: 'ODBC Driver 18 for SQL Server'
Expand Down
5 changes: 5 additions & 0 deletions macros/upload_individual_datasets/upload_exposures.sql
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,11 @@
{% endif %}
{%- endmacro %}

{% macro duckdb__get_exposures_dml_sql(exposures) -%}
{{ dbt_artifacts.postgres__get_exposures_dml_sql(exposures) }}
{%- endmacro %}


{% macro sqlserver__get_exposures_dml_sql(exposures) -%}

{% if exposures != [] %}
Expand Down
4 changes: 4 additions & 0 deletions macros/upload_individual_datasets/upload_invocations.sql
Original file line number Diff line number Diff line change
Expand Up @@ -236,6 +236,10 @@

{% endmacro -%}

{% macro duckdb__get_invocations_dml_sql() -%}
{{ dbt_artifacts.postgres__get_invocations_dml_sql() }}
{%- endmacro %}

{% macro trino__get_invocations_dml_sql() -%}
{% set invocation_values %}
(
Expand Down
4 changes: 4 additions & 0 deletions macros/upload_individual_datasets/upload_model_executions.sql
Original file line number Diff line number Diff line change
Expand Up @@ -200,6 +200,10 @@
{% endif %}
{%- endmacro %}

{% macro duckdb__get_model_executions_dml_sql(models) -%}
{{ dbt_artifacts.postgres__get_model_executions_dml_sql(models) }}
{%- endmacro %}


{% macro sqlserver__get_model_executions_dml_sql(models) -%}
{% if models != [] %}
Expand Down
3 changes: 3 additions & 0 deletions macros/upload_individual_datasets/upload_models.sql
Original file line number Diff line number Diff line change
Expand Up @@ -122,6 +122,9 @@
{% endif %}
{%- endmacro %}

{% macro duckdb__get_models_dml_sql(models) -%}
{{ dbt_artifacts.postgres__get_models_dml_sql(models) }}
{% endmacro %}

{% macro sqlserver__get_models_dml_sql(models) -%}

Expand Down
4 changes: 4 additions & 0 deletions macros/upload_individual_datasets/upload_seed_executions.sql
Original file line number Diff line number Diff line change
Expand Up @@ -214,6 +214,10 @@
{% endif %}
{% endmacro -%}

{% macro duckdb__get_seed_executions_dml_sql(seeds) -%}
{{ dbt_artifacts.postgres__get_seed_executions_dml_sql(seeds) }}
{% endmacro %}

{% macro sqlserver__get_seed_executions_dml_sql(seeds) -%}
{% if seeds != [] %}
{% set seed_execution_values %}
Expand Down
4 changes: 4 additions & 0 deletions macros/upload_individual_datasets/upload_seeds.sql
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,10 @@
{% endif %}
{%- endmacro %}

{% macro duckdb__get_seeds_dml_sql(seeds) -%}
{{ dbt_artifacts.postgres__get_seeds_dml_sql(seeds) }}
{% endmacro %}

{% macro sqlserver__get_seeds_dml_sql(seeds) -%}

{% if seeds != [] %}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -214,6 +214,10 @@
{% endif %}
{% endmacro -%}

{% macro duckdb__get_snapshot_executions_dml_sql(snapshots) -%}
{{ dbt_artifacts.postgres__get_snapshot_executions_dml_sql(snapshots) }}
{% endmacro -%}

{% macro sqlserver__get_snapshot_executions_dml_sql(snapshots) -%}
{% if snapshots != [] %}
{% set snapshot_execution_values %}
Expand Down
3 changes: 3 additions & 0 deletions macros/upload_individual_datasets/upload_snapshots.sql
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,9 @@
{% endif %}
{%- endmacro %}

{% macro duckdb__get_snapshots_dml_sql(snapshots) -%}
{{ dbt_artifacts.postgres__get_snapshots_dml_sql(snapshots) }}
{%- endmacro %}

{% macro sqlserver__get_snapshots_dml_sql(snapshots) -%}

Expand Down
3 changes: 3 additions & 0 deletions macros/upload_individual_datasets/upload_sources.sql
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,9 @@
{% endif %}
{%- endmacro %}

{% macro duckdb__get_sources_dml_sql(sources) -%}
{{ dbt_artifacts.postgres__get_sources_dml_sql(sources) }}
{%- endmacro %}

{% macro sqlserver__get_sources_dml_sql(sources) -%}

Expand Down
5 changes: 5 additions & 0 deletions macros/upload_individual_datasets/upload_test_executions.sql
Original file line number Diff line number Diff line change
Expand Up @@ -146,6 +146,11 @@
{% endif %}
{% endmacro -%}

{% macro duckdb__get_test_executions_dml_sql(tests) -%}
{{ dbt_artifacts.postgres__get_test_executions_dml_sql(tests) }}
{% endmacro -%}


{% macro snowflake__get_test_executions_dml_sql(tests) -%}
{% if tests != [] %}
{% set test_execution_values %}
Expand Down
3 changes: 3 additions & 0 deletions macros/upload_individual_datasets/upload_tests.sql
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,9 @@
{% endif %}
{%- endmacro %}

{% macro duckdb__get_tests_dml_sql(tests) -%}
{{ dbt_artifacts.postgres__get_tests_dml_sql(tests) }}
{% endmacro %}

{% macro sqlserver__get_tests_dml_sql(tests) -%}

Expand Down
12 changes: 12 additions & 0 deletions macros/upload_results/insert_into_metadata_table.sql
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,18 @@

{%- endmacro %}

{% macro duckdb__insert_into_metadata_table(relation, fields, content) -%}

{% set insert_into_table_query %}
insert into {{ relation }} {{ fields }}
values
{{ content }}
{% endset %}

{% do run_query(insert_into_table_query) %}

{%- endmacro %}

{% macro sqlserver__insert_into_metadata_table(relation, fields, content) -%}

{% set insert_into_table_query %}
Expand Down
70 changes: 70 additions & 0 deletions tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -391,6 +391,76 @@ commands =
dbt deps
dbt build --target postgres

[testenv:integration_duckdb]
changedir = integration_test_project
deps =
dbt-core~=1.9.0
dbt-duckdb~=1.9.0
commands =
dbt clean
dbt deps
dbt build --exclude tag:microbatch --target duckdb

[testenv:integration_duckdb_1_3_0]
changedir = integration_test_project
deps = dbt-duckdb~=1.3.0
commands =
dbt clean
dbt deps
dbt build --exclude tag:microbatch --target duckdb

[testenv:integration_duckdb_1_4_0]
changedir = integration_test_project
deps = dbt-duckdb~=1.4.0
commands =
dbt clean
dbt deps
dbt build --exclude tag:microbatch --target duckdb

[testenv:integration_duckdb_1_5_0]
changedir = integration_test_project
deps = dbt-duckdb~=1.5.0
commands =
dbt clean
dbt deps
dbt build --exclude tag:microbatch --target duckdb

[testenv:integration_duckdb_1_6_0]
changedir = integration_test_project
deps = dbt-duckdb~=1.6.0
commands =
dbt clean
dbt deps
dbt build --exclude tag:microbatch --target duckdb

[testenv:integration_duckdb_1_7_0]
changedir = integration_test_project
deps = dbt-duckdb~=1.7.0
commands =
dbt clean
dbt deps
dbt build --exclude tag:microbatch --target duckdb

[testenv:integration_duckdb_1_8_0]
changedir = integration_test_project
deps =
dbt-core~=1.8.0
dbt-duckdb~=1.8.0
commands =
dbt clean
dbt deps
dbt build --exclude tag:microbatch --target duckdb

[testenv:integration_duckdb_1_9_0]
changedir = integration_test_project
deps =
dbt-core~=1.9.0
dbt-duckdb~=1.9.0
commands =
dbt clean
dbt deps
dbt build --exclude tag:microbatch --target duckdb

[testenv:integration_sqlserver]
changedir = integration_test_project
deps = dbt-sqlserver~=1.8.0
Expand Down