Skip to content

Commit dfa315e

Browse files
fix: Dremio CI - single-threaded dbt run/test, fix cross-schema seed refs, quote reserved words
Co-Authored-By: Itamar Hartstein <haritamar@gmail.com>
1 parent af20d30 commit dfa315e

5 files changed

Lines changed: 26 additions & 8 deletions

File tree

.github/workflows/test-warehouse.yml

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -380,7 +380,12 @@ jobs:
380380
- name: Run e2e dbt project
381381
working-directory: ${{ env.E2E_DBT_PROJECT_DIR }}
382382
run: |
383-
dbt run --target "${{ inputs.warehouse-type }}" || true
383+
# Dremio needs single-threaded execution to avoid Nessie catalog race conditions
384+
EXTRA_ARGS=""
385+
if [ "${{ inputs.warehouse-type }}" = "dremio" ]; then
386+
EXTRA_ARGS="--threads 1"
387+
fi
388+
dbt run --target "${{ inputs.warehouse-type }}" $EXTRA_ARGS || true
384389
385390
# Validate run_results.json: only error_model should be non-success
386391
jq -e '
@@ -402,7 +407,12 @@ jobs:
402407
working-directory: ${{ env.E2E_DBT_PROJECT_DIR }}
403408
continue-on-error: true
404409
run: |
405-
dbt test --target "${{ inputs.warehouse-type }}"
410+
# Dremio needs single-threaded execution to avoid Nessie catalog race conditions
411+
EXTRA_ARGS=""
412+
if [ "${{ inputs.warehouse-type }}" = "dremio" ]; then
413+
EXTRA_ARGS="--threads 1"
414+
fi
415+
dbt test --target "${{ inputs.warehouse-type }}" $EXTRA_ARGS
406416
407417
- name: Run help
408418
run: edr --help

tests/e2e_dbt_project/macros/system/generate_schema_name.sql

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,16 @@
55
{% endif %}
66

77
{% if node.resource_type == "seed" %}
8+
{#- Dremio (Nessie/Iceberg): seeds are datalake nodes whose path is
9+
root_path + custom_schema. Views that ref() seeds resolve database
10+
to target.datalake but schema via this macro. We must return the
11+
full root_path-qualified schema so the relation renders correctly
12+
as <datalake>.<root_path>.<custom_schema>.<identifier>. -#}
13+
{% if target.type == 'dremio' %}
14+
{% do return("{}.{}".format(target.root_path, custom_schema_name)) %}
15+
{% endif %}
816
{% do return(custom_schema_name) %}
917
{% endif %}
1018

11-
{% do return("{}_{}".format(default_schema, custom_schema_name)) %}
19+
{% do return("{}_{}" .format(default_schema, custom_schema_name)) %}
1220
{%- endmacro %}
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
select 1 as one
1+
select 1 as "one"

tests/e2e_dbt_project/models/numeric_column_anomalies.sql

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,14 +16,14 @@ source as (
1616
select
1717
updated_at,
1818
occurred_at,
19-
min,
20-
max,
19+
"min",
20+
"max",
2121
zero_count,
2222
zero_percent,
2323
average,
2424
standard_deviation,
2525
variance,
26-
sum
26+
"sum"
2727
from source
2828
)
2929

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
select 1 as one
1+
select 1 as "one"

0 commit comments

Comments
 (0)