dbt-adapters 1.16.3__py3-none-any.whl → 1.16.5__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of dbt-adapters might be problematic. Click here for more details.
- dbt/adapters/__about__.py +1 -1
- dbt/include/global_project/macros/materializations/tests/unit.sql +10 -3
- dbt/include/global_project/macros/unit_test_sql/get_fixture_sql.sql +7 -4
- {dbt_adapters-1.16.3.dist-info → dbt_adapters-1.16.5.dist-info}/METADATA +2 -2
- {dbt_adapters-1.16.3.dist-info → dbt_adapters-1.16.5.dist-info}/RECORD +7 -7
- {dbt_adapters-1.16.3.dist-info → dbt_adapters-1.16.5.dist-info}/WHEEL +0 -0
- {dbt_adapters-1.16.3.dist-info → dbt_adapters-1.16.5.dist-info}/licenses/LICENSE +0 -0
dbt/adapters/__about__.py
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
version = "1.16.
|
|
1
|
+
version = "1.16.5"
|
|
@@ -4,21 +4,28 @@
|
|
|
4
4
|
|
|
5
5
|
{% set expected_rows = config.get('expected_rows') %}
|
|
6
6
|
{% set expected_sql = config.get('expected_sql') %}
|
|
7
|
-
{% set tested_expected_column_names = expected_rows[0].keys() if (expected_rows | length ) > 0 else get_columns_in_query(sql) %}
|
|
7
|
+
{% set tested_expected_column_names = expected_rows[0].keys() if (expected_rows | length ) > 0 else get_columns_in_query(sql) %}
|
|
8
8
|
|
|
9
9
|
{%- set target_relation = this.incorporate(type='table') -%}
|
|
10
10
|
{%- set temp_relation = make_temp_relation(target_relation)-%}
|
|
11
11
|
{% do run_query(get_create_table_as_sql(True, temp_relation, get_empty_subquery_sql(sql))) %}
|
|
12
12
|
{%- set columns_in_relation = adapter.get_columns_in_relation(temp_relation) -%}
|
|
13
13
|
{%- set column_name_to_data_types = {} -%}
|
|
14
|
+
{%- set column_name_to_quoted = {} -%}
|
|
14
15
|
{%- for column in columns_in_relation -%}
|
|
15
16
|
{%- do column_name_to_data_types.update({column.name|lower: column.data_type}) -%}
|
|
17
|
+
{%- do column_name_to_quoted.update({column.name|lower: column.quoted}) -%}
|
|
18
|
+
{%- endfor -%}
|
|
19
|
+
|
|
20
|
+
{%- set expected_column_names_quoted = [] -%}
|
|
21
|
+
{%- for column_name in tested_expected_column_names -%}
|
|
22
|
+
{%- do expected_column_names_quoted.append(column_name_to_quoted[column_name|lower]) -%}
|
|
16
23
|
{%- endfor -%}
|
|
17
24
|
|
|
18
25
|
{% if not expected_sql %}
|
|
19
|
-
{% set expected_sql = get_expected_sql(expected_rows, column_name_to_data_types) %}
|
|
26
|
+
{% set expected_sql = get_expected_sql(expected_rows, column_name_to_data_types, column_name_to_quoted) %}
|
|
20
27
|
{% endif %}
|
|
21
|
-
{% set unit_test_sql = get_unit_test_sql(sql, expected_sql,
|
|
28
|
+
{% set unit_test_sql = get_unit_test_sql(sql, expected_sql, expected_column_names_quoted) %}
|
|
22
29
|
|
|
23
30
|
{% call statement('main', fetch_result=True) -%}
|
|
24
31
|
|
|
@@ -8,9 +8,12 @@
|
|
|
8
8
|
{%- set columns_in_relation = adapter.get_columns_in_relation(this_or_defer_relation) -%}
|
|
9
9
|
|
|
10
10
|
{%- set column_name_to_data_types = {} -%}
|
|
11
|
+
{%- set column_name_to_quoted = {} -%}
|
|
11
12
|
{%- for column in columns_in_relation -%}
|
|
13
|
+
|
|
12
14
|
{#-- This needs to be a case-insensitive comparison --#}
|
|
13
15
|
{%- do column_name_to_data_types.update({column.name|lower: column.data_type}) -%}
|
|
16
|
+
{%- do column_name_to_quoted.update({column.name|lower: column.quoted}) -%}
|
|
14
17
|
{%- endfor -%}
|
|
15
18
|
{%- endif -%}
|
|
16
19
|
|
|
@@ -29,7 +32,7 @@
|
|
|
29
32
|
{%- set default_row_copy = default_row.copy() -%}
|
|
30
33
|
{%- do default_row_copy.update(formatted_row) -%}
|
|
31
34
|
select
|
|
32
|
-
{%- for column_name, column_value in default_row_copy.items() %} {{ column_value }} as {{ column_name }}{% if not loop.last -%}, {%- endif %}
|
|
35
|
+
{%- for column_name, column_value in default_row_copy.items() %} {{ column_value }} as {{ column_name_to_quoted[column_name] }}{% if not loop.last -%}, {%- endif %}
|
|
33
36
|
{%- endfor %}
|
|
34
37
|
{%- if not loop.last %}
|
|
35
38
|
union all
|
|
@@ -38,14 +41,14 @@ union all
|
|
|
38
41
|
|
|
39
42
|
{%- if (rows | length) == 0 -%}
|
|
40
43
|
select
|
|
41
|
-
{%- for column_name, column_value in default_row.items() %} {{ column_value }} as {{ column_name }}{% if not loop.last -%},{%- endif %}
|
|
44
|
+
{%- for column_name, column_value in default_row.items() %} {{ column_value }} as {{ column_name_to_quoted[column_name] }}{% if not loop.last -%},{%- endif %}
|
|
42
45
|
{%- endfor %}
|
|
43
46
|
limit 0
|
|
44
47
|
{%- endif -%}
|
|
45
48
|
{% endmacro %}
|
|
46
49
|
|
|
47
50
|
|
|
48
|
-
{% macro get_expected_sql(rows, column_name_to_data_types) %}
|
|
51
|
+
{% macro get_expected_sql(rows, column_name_to_data_types, column_name_to_quoted) %}
|
|
49
52
|
|
|
50
53
|
{%- if (rows | length) == 0 -%}
|
|
51
54
|
select * from dbt_internal_unit_test_actual
|
|
@@ -54,7 +57,7 @@ union all
|
|
|
54
57
|
{%- for row in rows -%}
|
|
55
58
|
{%- set formatted_row = format_row(row, column_name_to_data_types) -%}
|
|
56
59
|
select
|
|
57
|
-
{%- for column_name, column_value in formatted_row.items() %} {{ column_value }} as {{ column_name }}{% if not loop.last -%}, {%- endif %}
|
|
60
|
+
{%- for column_name, column_value in formatted_row.items() %} {{ column_value }} as {{ column_name_to_quoted[column_name] }}{% if not loop.last -%}, {%- endif %}
|
|
58
61
|
{%- endfor %}
|
|
59
62
|
{%- if not loop.last %}
|
|
60
63
|
union all
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: dbt-adapters
|
|
3
|
-
Version: 1.16.
|
|
3
|
+
Version: 1.16.5
|
|
4
4
|
Summary: The set of adapter protocols and base functionality that supports integration with dbt-core
|
|
5
5
|
Project-URL: Homepage, https://github.com/dbt-labs/dbt-adapters/tree/main/dbt-adapters
|
|
6
6
|
Project-URL: Documentation, https://docs.getdbt.com
|
|
@@ -25,7 +25,7 @@ Requires-Dist: agate<2.0,>=1.0
|
|
|
25
25
|
Requires-Dist: dbt-common<2.0,>=1.13
|
|
26
26
|
Requires-Dist: dbt-protos<2.0,>=1.0.291
|
|
27
27
|
Requires-Dist: mashumaro[msgpack]<3.15,>=3.9
|
|
28
|
-
Requires-Dist: protobuf<
|
|
28
|
+
Requires-Dist: protobuf<7.0,>=6.0
|
|
29
29
|
Requires-Dist: pytz>=2015.7
|
|
30
30
|
Requires-Dist: typing-extensions<5.0,>=4.0
|
|
31
31
|
Description-Content-Type: text/markdown
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
dbt/adapters/__about__.py,sha256=
|
|
1
|
+
dbt/adapters/__about__.py,sha256=Qz0BE08lu2_u7MixE7GM_8vIJjUC10H2IxTPA0I0kWU,19
|
|
2
2
|
dbt/adapters/__init__.py,sha256=3noHsg-64qI0_Pw6OR9F7l1vU2_qrJvinq8POTtuaZM,252
|
|
3
3
|
dbt/adapters/cache.py,sha256=WGy4ewnz-J13LverTACBW2iFhGswrWLgm-wiBrQnMzo,20084
|
|
4
4
|
dbt/adapters/capability.py,sha256=M3FkC9veKnNB7a7uQyl7EHX_AGNXPChbHAkcY4cgXCY,2534
|
|
@@ -105,7 +105,7 @@ dbt/include/global_project/macros/materializations/snapshots/snapshot_merge.sql,
|
|
|
105
105
|
dbt/include/global_project/macros/materializations/snapshots/strategies.sql,sha256=AfIsRiw0YnQym5wUiWR2JpiEEky4_WBTpTtE0HJvpZw,6928
|
|
106
106
|
dbt/include/global_project/macros/materializations/tests/helpers.sql,sha256=rxUxDZm4EvrDbi0H_ePghE34_QLmxGEY2o_LTMc9CU0,1731
|
|
107
107
|
dbt/include/global_project/macros/materializations/tests/test.sql,sha256=LP4ya-X5n499ccab7n1jqvGbZWZsG6hqJmWlx60BvHQ,2247
|
|
108
|
-
dbt/include/global_project/macros/materializations/tests/unit.sql,sha256=
|
|
108
|
+
dbt/include/global_project/macros/materializations/tests/unit.sql,sha256=aGbYzGbT5QWLb6f_2zwVoesYG8ttziZcU4Xj1XkRoJU,1610
|
|
109
109
|
dbt/include/global_project/macros/materializations/tests/where_subquery.sql,sha256=xjuYd18tXo99OReJGQsfgEPYljUUyF00XzK4h0SJjdM,497
|
|
110
110
|
dbt/include/global_project/macros/python_model/python.sql,sha256=qWoouNOP4Qdune_2Vitzmrzb0soHRzu0S4K22amVZK8,4056
|
|
111
111
|
dbt/include/global_project/macros/relations/create.sql,sha256=99LLak1bhlhRw7yiI0c_4CKPlGyzqPBeBYBNeBPSmDo,701
|
|
@@ -132,7 +132,7 @@ dbt/include/global_project/macros/relations/view/create.sql,sha256=VXIsJWo4OZ_8k
|
|
|
132
132
|
dbt/include/global_project/macros/relations/view/drop.sql,sha256=iFjhEwzip00TGd8h6T5UsXo4dK440EvgdKwR_j4XX78,497
|
|
133
133
|
dbt/include/global_project/macros/relations/view/rename.sql,sha256=P4hpxlrR0wiBTZFJ8N3GyUUbqgKgMfgzUUbIWw8fui0,348
|
|
134
134
|
dbt/include/global_project/macros/relations/view/replace.sql,sha256=cLqNkmTxAxsJS8g-dj4K6IikpjDGKlyCECA3nerPMzg,2593
|
|
135
|
-
dbt/include/global_project/macros/unit_test_sql/get_fixture_sql.sql,sha256=
|
|
135
|
+
dbt/include/global_project/macros/unit_test_sql/get_fixture_sql.sql,sha256=gP8G459g7U9_mPcX-ZphxTR6o9mzU3Nrjc0APIb3srk,4436
|
|
136
136
|
dbt/include/global_project/macros/utils/any_value.sql,sha256=leK-fCUhDNt6MFkGofafYjv-0LtL0fkb3sJXe-aIorU,213
|
|
137
137
|
dbt/include/global_project/macros/utils/array_append.sql,sha256=XsC-kchlWxVwc-_1CoBs1RkGYt8qsOAVbq5JlsV2WIc,357
|
|
138
138
|
dbt/include/global_project/macros/utils/array_concat.sql,sha256=0c4w5kP1N_9BY-wppx1OBCCIDOsC1HhimkSDghjjx2Y,248
|
|
@@ -163,7 +163,7 @@ dbt/include/global_project/macros/utils/right.sql,sha256=EwNG98CAFIwNDmarwopf7Rk
|
|
|
163
163
|
dbt/include/global_project/macros/utils/safe_cast.sql,sha256=1mswwkDACmIi1I99JKb_-vq3kjMe4HhMRV70mW8Bt4Y,298
|
|
164
164
|
dbt/include/global_project/macros/utils/split_part.sql,sha256=fXEIS0oIiYR7-4lYbb0QbZdG-q2TpV63AFd1ky4I5UM,714
|
|
165
165
|
dbt/include/global_project/tests/generic/builtin.sql,sha256=p94xdyPwb2TlxgLBqCfrcRfJ1QNgsjPvBm8f0Q5eqZM,1022
|
|
166
|
-
dbt_adapters-1.16.
|
|
167
|
-
dbt_adapters-1.16.
|
|
168
|
-
dbt_adapters-1.16.
|
|
169
|
-
dbt_adapters-1.16.
|
|
166
|
+
dbt_adapters-1.16.5.dist-info/METADATA,sha256=otMClzeh3gNK273cCp3pI2qGK6GYjumhFN6RYt_ka9k,4534
|
|
167
|
+
dbt_adapters-1.16.5.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
|
|
168
|
+
dbt_adapters-1.16.5.dist-info/licenses/LICENSE,sha256=9yjigiJhWcCZvQjdagGKDwrRph58QWc5P2bVSQwXo6s,11344
|
|
169
|
+
dbt_adapters-1.16.5.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|