Skip to content

Commit

Permalink
additional changes
Browse files Browse the repository at this point in the history
  • Loading branch information
prdpsvs committed May 21, 2024
1 parent e886a69 commit eb7e3f8
Show file tree
Hide file tree
Showing 6 changed files with 10 additions and 10 deletions.
2 changes: 1 addition & 1 deletion dbt/adapters/fabric/__version__.py
Original file line number Diff line number Diff line change
@@ -1 +1 @@
version = "1.8.5"
version = "1.8.6"
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

{%- set full_refresh_mode = (should_full_refresh()) -%}
{% set target_relation = this.incorporate(type='table') %}
{%- set relations_list = get_relation_without_caching(target_relation) -%}
{%- set relations_list = fabric__get_relation_without_caching(target_relation) -%}

{%- set existing_relation = none %}
{% if (relations_list|length == 1) and (relations_list[0][2] == target_relation.schema)
Expand Down Expand Up @@ -31,7 +31,7 @@
{% if existing_relation is none %}

{%- call statement('main') -%}
{{ create_table_as(False, target_relation, sql)}}
{{ get_create_table_as_sql(False, target_relation, sql)}}
{%- endcall -%}

{% elif existing_relation.is_view %}
Expand All @@ -40,19 +40,19 @@
{{ log("Dropping relation " ~ target_relation ~ " because it is a view and this model is a table.") }}
{{ drop_relation_if_exists(existing_relation) }}
{%- call statement('main') -%}
{{ create_table_as(False, target_relation, sql)}}
{{ get_create_table_as_sql(False, target_relation, sql)}}
{%- endcall -%}

{% elif full_refresh_mode %}

{%- call statement('main') -%}
{{ create_table_as(False, target_relation, sql)}}
{{ get_create_table_as_sql(False, target_relation, sql)}}
{%- endcall -%}

{% else %}

{%- call statement('create_tmp_relation') -%}
{{ create_table_as(True, temp_relation, sql)}}
{{ get_create_table_as_sql(True, temp_relation, sql)}}
{%- endcall -%}
{% do adapter.expand_target_column_types(
from_relation=temp_relation,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

{% set contract_config = config.get('contract') %}

{{ create_view_as(tmp_relation, sql) }}
{{ get_create_view_as_sql(tmp_relation, sql) }}
{% if contract_config.enforced %}

CREATE TABLE [{{relation.database}}].[{{relation.schema}}].[{{relation.identifier}}]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
{%- set target_relation = this.incorporate(type='view') -%}
{{log("Target Relation "~target_relation)}}

{%- set relation = get_relation_without_caching(this) %}
{%- set relation = fabric__get_relation_without_caching(this) %}
{% set existing_relation = none %}
{% if (relation|length == 1) %}
{% set existing_relation = get_or_create_relation(relation[0][0], relation[0][2] , relation[0][1] , relation[0][3])[1] %}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -192,7 +192,7 @@
{% set temp_relation = make_temp_relation(target_relation) %}
{% set select = snapshot_staging_table(strategy, temp_snapshot_relation, target_relation) %}
{% call statement('build_snapshot_staging_relation') %}
{{ create_table_as(True, temp_relation, select) }}
{{ get_create_table_as_sql(True, temp_relation, select) }}
{% endcall %}

{% do return(temp_relation) %}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@
{% if not target_relation_exists %}

{% set build_sql = build_snapshot_table(strategy, temp_snapshot_relation) %}
{% set final_sql = create_table_as(False, target_relation, build_sql) %}
{% set final_sql = get_create_table_as_sql(False, target_relation, build_sql) %}

{% else %}

Expand Down

0 comments on commit eb7e3f8

Please sign in to comment.