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
3 changes: 3 additions & 0 deletions dbt_project.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,3 +21,6 @@ models:
columns: '{{ target.name != "databricks" and target.type != "sqlserver" }}'
relation: '{{ target.type != "sqlserver" }}'
+as_columnstore: False
insert_batch_size:
models: "{{ 50 if target.type in ['bigquery', 'trino'] else 100 }}"
default: "{{ 300 if target.type in ['bigquery', 'trino'] else 5000 }}"
6 changes: 1 addition & 5 deletions macros/upload_results/upload_results.sql
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,7 @@
{% set objects = dbt_artifacts.get_dataset_content(dataset) %}

{# Upload in chunks to reduce the query size #}
{% if dataset == 'models' %}
{% set upload_limit = 50 if target.type == 'bigquery' else 100 %}
{% else %}
{% set upload_limit = 300 if target.type == 'bigquery' else 5000 %}
{% endif %}
{% set upload_limit = var('insert_batch_size')[dataset if dataset == 'models' else 'default'] %}

{# Loop through each chunk in turn #}
{% for i in range(0, objects | length, upload_limit) -%}
Expand Down
Loading