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
6 changes: 3 additions & 3 deletions dbt_project.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ models:
+materialized: incremental
+full_refresh: false
+persist_docs:
# Databricks and SQL Server don't offer column-level support for persisting docs
columns: '{{ target.type != "databricks" and target.type != "sqlserver" }}'
relation: '{{ target.type != "sqlserver" }}'
# These adapters don't offer column-level support for persisting docs.
columns: '{{ target.type not in ["databricks", "sqlserver", "fabric"] }}'
relation: '{{ target.type not in ["sqlserver", "fabric"] }}'
+as_columnstore: False
14 changes: 7 additions & 7 deletions macros/upload_results/get_column_name_lists.sql
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@
{% if target.type == "bigquery" %} bytes_processed,
{% endif %}
materialization,
{% if target.type == "sqlserver" %} "schema",
{% if target.type in ["sqlserver", "fabric"] %} "schema",
{% else %} schema,
{% endif %}
name,
Expand All @@ -78,7 +78,7 @@
command_invocation_id,
node_id,
run_started_at,
{% if target.type == "sqlserver" %} "database", "schema",
{% if target.type in ["sqlserver", "fabric"] %} "database", "schema",
{% else %} database, schema,
{% endif %}
name,
Expand Down Expand Up @@ -107,7 +107,7 @@
total_node_runtime,
rows_affected,
materialization,
{% if target.type == "sqlserver" %} "schema",
{% if target.type in ["sqlserver", "fabric"] %} "schema",
{% else %} schema,
{% endif %}
name,
Expand All @@ -122,7 +122,7 @@
command_invocation_id,
node_id,
run_started_at,
{% if target.type == "sqlserver" %} "database", "schema",
{% if target.type in ["sqlserver", "fabric"] %} "database", "schema",
{% else %} database, schema,
{% endif %}
name,
Expand All @@ -148,7 +148,7 @@
total_node_runtime,
rows_affected,
materialization,
{% if target.type == "sqlserver" %} "schema",
{% if target.type in ["sqlserver", "fabric"] %} "schema",
{% else %} schema,
{% endif %}
name,
Expand All @@ -163,7 +163,7 @@
command_invocation_id,
node_id,
run_started_at,
{% if target.type == "sqlserver" %} "database", "schema",
{% if target.type in ["sqlserver", "fabric"] %} "database", "schema",
{% else %} database, schema,
{% endif %}
name,
Expand All @@ -183,7 +183,7 @@
command_invocation_id,
node_id,
run_started_at,
{% if target.type == "sqlserver" %} "database", "schema",
{% if target.type in ["sqlserver", "fabric"] %} "database", "schema",
{% else %} database, schema,
{% endif %}
source_name,
Expand Down
12 changes: 6 additions & 6 deletions models/dim_dbt__current_models.sql
Original file line number Diff line number Diff line change
Expand Up @@ -42,19 +42,19 @@ with
node_id,
max(
case
when was_full_refresh {% if target.type == "sqlserver" %} = 1 {% endif %}
when was_full_refresh {% if target.type in ["sqlserver", "fabric"] %} = 1 {% endif %}
then query_completed_at
end
) as last_full_refresh_run_completed_at,
max(
case
when was_full_refresh {% if target.type == "sqlserver" %} = 1 {% endif %}
when was_full_refresh {% if target.type in ["sqlserver", "fabric"] %} = 1 {% endif %}
then total_node_runtime
end
) as last_full_refresh_run_total_runtime,
max(
case
when was_full_refresh {% if target.type == "sqlserver" %} = 1 {% endif %}
when was_full_refresh {% if target.type in ["sqlserver", "fabric"] %} = 1 {% endif %}
then rows_affected
end
) as last_full_refresh_run_rows_affected
Expand All @@ -77,19 +77,19 @@ with
{% endif %},
max(
case
when not was_full_refresh {% if target.type == "sqlserver" %} = 1 {% endif %}
when not was_full_refresh {% if target.type in ["sqlserver", "fabric"] %} = 1 {% endif %}
then query_completed_at
end
) as last_incremental_run_completed_at,
max(
case
when not was_full_refresh {% if target.type == "sqlserver" %} = 1 {% endif %}
when not was_full_refresh {% if target.type in ["sqlserver", "fabric"] %} = 1 {% endif %}
then total_node_runtime
end
) as last_incremental_run_total_runtime,
max(
case
when not was_full_refresh {% if target.type == "sqlserver" %} = 1 {% endif %}
when not was_full_refresh {% if target.type in ["sqlserver", "fabric"] %} = 1 {% endif %}
then rows_affected
end
) as last_incremental_run_rows_affected
Expand Down
4 changes: 2 additions & 2 deletions models/dim_dbt__models.sql
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,10 @@ with
node_id,
run_started_at,
name,
{% if target.type == "sqlserver" %} "database"
{% if target.type in ["sqlserver", "fabric"] %} "database"
{% else %} database
{% endif %},
{% if target.type == "sqlserver" %} "schema"
{% if target.type in ["sqlserver", "fabric"] %} "schema"
{% else %} schema
{% endif %},
depends_on_nodes,
Expand Down
4 changes: 2 additions & 2 deletions models/dim_dbt__seeds.sql
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,10 @@ with
node_id,
run_started_at,
name,
{% if target.type == "sqlserver" %} "database"
{% if target.type in ["sqlserver", "fabric"] %} "database"
{% else %} database
{% endif %},
{% if target.type == "sqlserver" %} "schema"
{% if target.type in ["sqlserver", "fabric"] %} "schema"
{% else %} schema
{% endif %},
package_name,
Expand Down
4 changes: 2 additions & 2 deletions models/dim_dbt__snapshots.sql
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,10 @@ with
node_id,
run_started_at,
name,
{% if target.type == "sqlserver" %} "database"
{% if target.type in ["sqlserver", "fabric"] %} "database"
{% else %} database
{% endif %},
{% if target.type == "sqlserver" %} "schema"
{% if target.type in ["sqlserver", "fabric"] %} "schema"
{% else %} schema
{% endif %},
depends_on_nodes,
Expand Down
4 changes: 2 additions & 2 deletions models/dim_dbt__sources.sql
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,10 @@ with
command_invocation_id,
node_id,
run_started_at,
{% if target.type == "sqlserver" %} "database"
{% if target.type in ["sqlserver", "fabric"] %} "database"
{% else %} database
{% endif %},
{% if target.type == "sqlserver" %} "schema"
{% if target.type in ["sqlserver", "fabric"] %} "schema"
{% else %} schema
{% endif %},
source_name,
Expand Down
2 changes: 1 addition & 1 deletion models/fct_dbt__model_executions.sql
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ with
rows_affected
{% if target.type == "bigquery" %}, bytes_processed {% endif %},
materialization,
{% if target.type == "sqlserver" %} "schema"
{% if target.type in ["sqlserver", "fabric"] %} "schema"
{% else %} schema
{% endif %},
name,
Expand Down
2 changes: 1 addition & 1 deletion models/fct_dbt__seed_executions.sql
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ with
total_node_runtime,
rows_affected,
materialization,
{% if target.type == "sqlserver" %} "schema"
{% if target.type in ["sqlserver", "fabric"] %} "schema"
{% else %} schema
{% endif %},
name,
Expand Down
2 changes: 1 addition & 1 deletion models/fct_dbt__snapshot_executions.sql
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ with
total_node_runtime,
rows_affected,
materialization,
{% if target.type == "sqlserver" %} "schema"
{% if target.type in ["sqlserver", "fabric"] %} "schema"
{% else %} schema
{% endif %},
name,
Expand Down
2 changes: 1 addition & 1 deletion models/sources/model_executions.sql
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ select
cast(null as {{ type_int() }}) as bytes_processed,
{% endif %}
cast(null as {{ type_string() }}) as materialization,
cast(null as {{ type_string() }}) as {% if target.type == "sqlserver" %} "schema"
cast(null as {{ type_string() }}) as {% if target.type in ["sqlserver", "fabric"] %} "schema"
{% else %} schema
{% endif %},
cast(null as {{ type_string() }}) as name,
Expand Down
4 changes: 2 additions & 2 deletions models/sources/models.sql
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@ select
cast(null as {{ type_string() }}) as command_invocation_id,
cast(null as {{ type_string() }}) as node_id,
cast(null as {{ type_timestamp() }}) as run_started_at,
cast(null as {{ type_string() }}) as {% if target.type == "sqlserver" %} "database"
cast(null as {{ type_string() }}) as {% if target.type in ["sqlserver", "fabric"] %} "database"
{% else %} database
{% endif %},
cast(null as {{ type_string() }}) as {% if target.type == "sqlserver" %} "schema"
cast(null as {{ type_string() }}) as {% if target.type in ["sqlserver", "fabric"] %} "schema"
{% else %} schema
{% endif %},
cast(null as {{ type_string() }}) as name,
Expand Down
2 changes: 1 addition & 1 deletion models/sources/seed_executions.sql
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ select
cast(null as {{ type_float() }}) as total_node_runtime,
cast(null as {{ type_int() }}) as rows_affected,
cast(null as {{ type_string() }}) as materialization,
cast(null as {{ type_string() }}) as {% if target.type == "sqlserver" %} "schema"
cast(null as {{ type_string() }}) as {% if target.type in ["sqlserver", "fabric"] %} "schema"
{% else %} schema
{% endif %},
cast(null as {{ type_string() }}) as name,
Expand Down
4 changes: 2 additions & 2 deletions models/sources/seeds.sql
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@ select
cast(null as {{ type_string() }}) as command_invocation_id,
cast(null as {{ type_string() }}) as node_id,
cast(null as {{ type_timestamp() }}) as run_started_at,
cast(null as {{ type_string() }}) as {% if target.type == "sqlserver" %} "database"
cast(null as {{ type_string() }}) as {% if target.type in ["sqlserver", "fabric"] %} "database"
{% else %} database
{% endif %},
cast(null as {{ type_string() }}) as {% if target.type == "sqlserver" %} "schema"
cast(null as {{ type_string() }}) as {% if target.type in ["sqlserver", "fabric"] %} "schema"
{% else %} schema
{% endif %},
cast(null as {{ type_string() }}) as name,
Expand Down
2 changes: 1 addition & 1 deletion models/sources/snapshot_executions.sql
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ select
cast(null as {{ type_float() }}) as total_node_runtime,
cast(null as {{ type_int() }}) as rows_affected,
cast(null as {{ type_string() }}) as materialization,
cast(null as {{ type_string() }}) as {% if target.type == "sqlserver" %} "schema"
cast(null as {{ type_string() }}) as {% if target.type in ["sqlserver", "fabric"] %} "schema"
{% else %} schema
{% endif %},
cast(null as {{ type_string() }}) as name,
Expand Down
4 changes: 2 additions & 2 deletions models/sources/snapshots.sql
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@ select
cast(null as {{ type_string() }}) as command_invocation_id,
cast(null as {{ type_string() }}) as node_id,
cast(null as {{ type_timestamp() }}) as run_started_at,
cast(null as {{ type_string() }}) as {% if target.type == "sqlserver" %} "database"
cast(null as {{ type_string() }}) as {% if target.type in ["sqlserver", "fabric"] %} "database"
{% else %} database
{% endif %},
cast(null as {{ type_string() }}) as {% if target.type == "sqlserver" %} "schema"
cast(null as {{ type_string() }}) as {% if target.type in ["sqlserver", "fabric"] %} "schema"
{% else %} schema
{% endif %},
cast(null as {{ type_string() }}) as name,
Expand Down
4 changes: 2 additions & 2 deletions models/sources/sources.sql
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@ select
cast(null as {{ type_string() }}) as command_invocation_id,
cast(null as {{ type_string() }}) as node_id,
cast(null as {{ type_timestamp() }}) as run_started_at,
cast(null as {{ type_string() }}) as {% if target.type == "sqlserver" %} "database"
cast(null as {{ type_string() }}) as {% if target.type in ["sqlserver", "fabric"] %} "database"
{% else %} database
{% endif %},
cast(null as {{ type_string() }}) as {% if target.type == "sqlserver" %} "schema"
cast(null as {{ type_string() }}) as {% if target.type in ["sqlserver", "fabric"] %} "schema"
{% else %} schema
{% endif %},
cast(null as {{ type_string() }}) as source_name,
Expand Down
2 changes: 1 addition & 1 deletion models/staging/stg_dbt__model_executions.sql
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ with
rows_affected
{% if target.type == "bigquery" %}, bytes_processed {% endif %},
materialization,
{% if target.type == "sqlserver" %} "schema"
{% if target.type in ["sqlserver", "fabric"] %} "schema"
{% else %} schema
{% endif %}, -- noqa
name,
Expand Down
4 changes: 2 additions & 2 deletions models/staging/stg_dbt__models.sql
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,10 @@ with
command_invocation_id,
node_id,
run_started_at,
{% if target.type == "sqlserver" %} "database"
{% if target.type in ["sqlserver", "fabric"] %} "database"
{% else %} database
{% endif %},
{% if target.type == "sqlserver" %} "schema"
{% if target.type in ["sqlserver", "fabric"] %} "schema"
{% else %} schema
{% endif %}, -- noqa
name,
Expand Down
2 changes: 1 addition & 1 deletion models/staging/stg_dbt__seed_executions.sql
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ with
total_node_runtime,
rows_affected,
materialization,
{% if target.type == "sqlserver" %} "schema"
{% if target.type in ["sqlserver", "fabric"] %} "schema"
{% else %} schema
{% endif %}, -- noqa
name,
Expand Down
4 changes: 2 additions & 2 deletions models/staging/stg_dbt__seeds.sql
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,10 @@ with
command_invocation_id,
node_id,
run_started_at,
{% if target.type == "sqlserver" %} "database"
{% if target.type in ["sqlserver", "fabric"] %} "database"
{% else %} database
{% endif %},
{% if target.type == "sqlserver" %} "schema"
{% if target.type in ["sqlserver", "fabric"] %} "schema"
{% else %} schema
{% endif %},
name,
Expand Down
2 changes: 1 addition & 1 deletion models/staging/stg_dbt__snapshot_executions.sql
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ with
total_node_runtime,
rows_affected,
materialization,
{% if target.type == "sqlserver" %} "schema"
{% if target.type in ["sqlserver", "fabric"] %} "schema"
{% else %} schema
{% endif %}, -- noqa
name,
Expand Down
4 changes: 2 additions & 2 deletions models/staging/stg_dbt__snapshots.sql
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,10 @@ with
command_invocation_id,
node_id,
run_started_at,
{% if target.type == "sqlserver" %} "database"
{% if target.type in ["sqlserver", "fabric"] %} "database"
{% else %} database
{% endif %},
{% if target.type == "sqlserver" %} "schema"
{% if target.type in ["sqlserver", "fabric"] %} "schema"
{% else %} schema
{% endif %},
name,
Expand Down
4 changes: 2 additions & 2 deletions models/staging/stg_dbt__sources.sql
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,10 @@ with
command_invocation_id,
node_id,
run_started_at,
{% if target.type == "sqlserver" %} "database"
{% if target.type in ["sqlserver", "fabric"] %} "database"
{% else %} database
{% endif %},
{% if target.type == "sqlserver" %} "schema"
{% if target.type in ["sqlserver", "fabric"] %} "schema"
{% else %} schema
{% endif %},
source_name,
Expand Down