dbt-postgres 1.7.13__tar.gz → 1.7.15__tar.gz
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.
- {dbt_postgres-1.7.13/dbt_postgres.egg-info → dbt_postgres-1.7.15}/PKG-INFO +2 -2
- dbt_postgres-1.7.15/dbt/adapters/postgres/__version__.py +1 -0
- {dbt_postgres-1.7.13 → dbt_postgres-1.7.15}/dbt/adapters/postgres/relation.py +11 -8
- {dbt_postgres-1.7.13 → dbt_postgres-1.7.15}/dbt/adapters/postgres/relation_configs/materialized_view.py +2 -2
- {dbt_postgres-1.7.13 → dbt_postgres-1.7.15}/dbt/include/postgres/macros/adapters.sql +1 -1
- {dbt_postgres-1.7.13 → dbt_postgres-1.7.15}/dbt/include/postgres/macros/relations/materialized_view/alter.sql +2 -1
- {dbt_postgres-1.7.13 → dbt_postgres-1.7.15}/dbt/include/postgres/macros/relations/materialized_view/create.sql +1 -1
- {dbt_postgres-1.7.13 → dbt_postgres-1.7.15/dbt_postgres.egg-info}/PKG-INFO +2 -2
- {dbt_postgres-1.7.13 → dbt_postgres-1.7.15}/dbt_postgres.egg-info/requires.txt +1 -1
- {dbt_postgres-1.7.13 → dbt_postgres-1.7.15}/setup.py +1 -1
- dbt_postgres-1.7.13/dbt/adapters/postgres/__version__.py +0 -1
- {dbt_postgres-1.7.13 → dbt_postgres-1.7.15}/MANIFEST.in +0 -0
- {dbt_postgres-1.7.13 → dbt_postgres-1.7.15}/README.md +0 -0
- {dbt_postgres-1.7.13 → dbt_postgres-1.7.15}/dbt/__init__.py +0 -0
- {dbt_postgres-1.7.13 → dbt_postgres-1.7.15}/dbt/adapters/__init__.py +0 -0
- {dbt_postgres-1.7.13 → dbt_postgres-1.7.15}/dbt/adapters/postgres/__init__.py +0 -0
- {dbt_postgres-1.7.13 → dbt_postgres-1.7.15}/dbt/adapters/postgres/column.py +0 -0
- {dbt_postgres-1.7.13 → dbt_postgres-1.7.15}/dbt/adapters/postgres/connections.py +0 -0
- {dbt_postgres-1.7.13 → dbt_postgres-1.7.15}/dbt/adapters/postgres/impl.py +0 -0
- {dbt_postgres-1.7.13 → dbt_postgres-1.7.15}/dbt/adapters/postgres/relation_configs/__init__.py +0 -0
- {dbt_postgres-1.7.13 → dbt_postgres-1.7.15}/dbt/adapters/postgres/relation_configs/constants.py +0 -0
- {dbt_postgres-1.7.13 → dbt_postgres-1.7.15}/dbt/adapters/postgres/relation_configs/index.py +0 -0
- {dbt_postgres-1.7.13 → dbt_postgres-1.7.15}/dbt/include/postgres/__init__.py +0 -0
- {dbt_postgres-1.7.13 → dbt_postgres-1.7.15}/dbt/include/postgres/dbt_project.yml +0 -0
- {dbt_postgres-1.7.13 → dbt_postgres-1.7.15}/dbt/include/postgres/macros/catalog.sql +0 -0
- {dbt_postgres-1.7.13 → dbt_postgres-1.7.15}/dbt/include/postgres/macros/materializations/incremental_strategies.sql +0 -0
- {dbt_postgres-1.7.13 → dbt_postgres-1.7.15}/dbt/include/postgres/macros/materializations/snapshot_merge.sql +0 -0
- {dbt_postgres-1.7.13 → dbt_postgres-1.7.15}/dbt/include/postgres/macros/relations/materialized_view/describe.sql +0 -0
- {dbt_postgres-1.7.13 → dbt_postgres-1.7.15}/dbt/include/postgres/macros/relations/materialized_view/drop.sql +0 -0
- {dbt_postgres-1.7.13 → dbt_postgres-1.7.15}/dbt/include/postgres/macros/relations/materialized_view/refresh.sql +0 -0
- {dbt_postgres-1.7.13 → dbt_postgres-1.7.15}/dbt/include/postgres/macros/relations/materialized_view/rename.sql +0 -0
- {dbt_postgres-1.7.13 → dbt_postgres-1.7.15}/dbt/include/postgres/macros/relations/table/drop.sql +0 -0
- {dbt_postgres-1.7.13 → dbt_postgres-1.7.15}/dbt/include/postgres/macros/relations/table/rename.sql +0 -0
- {dbt_postgres-1.7.13 → dbt_postgres-1.7.15}/dbt/include/postgres/macros/relations/table/replace.sql +0 -0
- {dbt_postgres-1.7.13 → dbt_postgres-1.7.15}/dbt/include/postgres/macros/relations/view/drop.sql +0 -0
- {dbt_postgres-1.7.13 → dbt_postgres-1.7.15}/dbt/include/postgres/macros/relations/view/rename.sql +0 -0
- {dbt_postgres-1.7.13 → dbt_postgres-1.7.15}/dbt/include/postgres/macros/relations/view/replace.sql +0 -0
- {dbt_postgres-1.7.13 → dbt_postgres-1.7.15}/dbt/include/postgres/macros/relations.sql +0 -0
- {dbt_postgres-1.7.13 → dbt_postgres-1.7.15}/dbt/include/postgres/macros/timestamps.sql +0 -0
- {dbt_postgres-1.7.13 → dbt_postgres-1.7.15}/dbt/include/postgres/macros/utils/any_value.sql +0 -0
- {dbt_postgres-1.7.13 → dbt_postgres-1.7.15}/dbt/include/postgres/macros/utils/columns_spec_ddl.sql +0 -0
- {dbt_postgres-1.7.13 → dbt_postgres-1.7.15}/dbt/include/postgres/macros/utils/dateadd.sql +0 -0
- {dbt_postgres-1.7.13 → dbt_postgres-1.7.15}/dbt/include/postgres/macros/utils/datediff.sql +0 -0
- {dbt_postgres-1.7.13 → dbt_postgres-1.7.15}/dbt/include/postgres/macros/utils/last_day.sql +0 -0
- {dbt_postgres-1.7.13 → dbt_postgres-1.7.15}/dbt/include/postgres/macros/utils/listagg.sql +0 -0
- {dbt_postgres-1.7.13 → dbt_postgres-1.7.15}/dbt/include/postgres/macros/utils/split_part.sql +0 -0
- {dbt_postgres-1.7.13 → dbt_postgres-1.7.15}/dbt/include/postgres/profile_template.yml +0 -0
- {dbt_postgres-1.7.13 → dbt_postgres-1.7.15}/dbt/include/postgres/sample_profiles.yml +0 -0
- {dbt_postgres-1.7.13 → dbt_postgres-1.7.15}/dbt_postgres.egg-info/SOURCES.txt +0 -0
- {dbt_postgres-1.7.13 → dbt_postgres-1.7.15}/dbt_postgres.egg-info/dependency_links.txt +0 -0
- {dbt_postgres-1.7.13 → dbt_postgres-1.7.15}/dbt_postgres.egg-info/not-zip-safe +0 -0
- {dbt_postgres-1.7.13 → dbt_postgres-1.7.15}/dbt_postgres.egg-info/top_level.txt +0 -0
- {dbt_postgres-1.7.13 → dbt_postgres-1.7.15}/setup.cfg +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: dbt-postgres
|
|
3
|
-
Version: 1.7.
|
|
3
|
+
Version: 1.7.15
|
|
4
4
|
Summary: The postgres adapter plugin for dbt (data build tool)
|
|
5
5
|
Home-page: https://github.com/dbt-labs/dbt-core
|
|
6
6
|
Author: dbt Labs
|
|
@@ -16,7 +16,7 @@ Classifier: Programming Language :: Python :: 3.10
|
|
|
16
16
|
Classifier: Programming Language :: Python :: 3.11
|
|
17
17
|
Requires-Python: >=3.8
|
|
18
18
|
Description-Content-Type: text/markdown
|
|
19
|
-
Requires-Dist: dbt-core==1.7.
|
|
19
|
+
Requires-Dist: dbt-core==1.7.15
|
|
20
20
|
Requires-Dist: psycopg2-binary~=2.8
|
|
21
21
|
Requires-Dist: agate
|
|
22
22
|
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
version = "1.7.15"
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
from dataclasses import dataclass, field
|
|
2
|
-
from typing import
|
|
2
|
+
from typing import FrozenSet, List, Optional
|
|
3
3
|
|
|
4
4
|
from dbt.adapters.base.relation import BaseRelation
|
|
5
5
|
from dbt.adapters.relation_configs import (
|
|
@@ -26,7 +26,6 @@ class PostgresRelation(BaseRelation):
|
|
|
26
26
|
{
|
|
27
27
|
RelationType.View,
|
|
28
28
|
RelationType.Table,
|
|
29
|
-
RelationType.MaterializedView,
|
|
30
29
|
}
|
|
31
30
|
)
|
|
32
31
|
)
|
|
@@ -83,7 +82,7 @@ class PostgresRelation(BaseRelation):
|
|
|
83
82
|
self,
|
|
84
83
|
existing_indexes: FrozenSet[PostgresIndexConfig],
|
|
85
84
|
new_indexes: FrozenSet[PostgresIndexConfig],
|
|
86
|
-
) ->
|
|
85
|
+
) -> List[PostgresIndexConfigChange]:
|
|
87
86
|
"""
|
|
88
87
|
Get the index updates that will occur as a result of a new run
|
|
89
88
|
|
|
@@ -94,18 +93,22 @@ class PostgresRelation(BaseRelation):
|
|
|
94
93
|
3. Index is old -> drop these
|
|
95
94
|
4. Indexes are not equal -> drop old, create new -> two actions
|
|
96
95
|
|
|
96
|
+
*Note:*
|
|
97
|
+
The order of the operations matters here because if the same index is dropped and recreated
|
|
98
|
+
(e.g. via --full-refresh) then we need to drop it first, then create it.
|
|
99
|
+
|
|
97
100
|
Returns: a set of index updates in the form {"action": "drop/create", "context": <IndexConfig>}
|
|
98
101
|
"""
|
|
99
|
-
drop_changes =
|
|
102
|
+
drop_changes = [
|
|
100
103
|
PostgresIndexConfigChange.from_dict(
|
|
101
104
|
{"action": RelationConfigChangeAction.drop, "context": index}
|
|
102
105
|
)
|
|
103
106
|
for index in existing_indexes.difference(new_indexes)
|
|
104
|
-
|
|
105
|
-
create_changes =
|
|
107
|
+
]
|
|
108
|
+
create_changes = [
|
|
106
109
|
PostgresIndexConfigChange.from_dict(
|
|
107
110
|
{"action": RelationConfigChangeAction.create, "context": index}
|
|
108
111
|
)
|
|
109
112
|
for index in new_indexes.difference(existing_indexes)
|
|
110
|
-
|
|
111
|
-
return
|
|
113
|
+
]
|
|
114
|
+
return drop_changes + create_changes
|
|
@@ -102,7 +102,7 @@ class PostgresMaterializedViewConfig(RelationConfigBase, RelationConfigValidatio
|
|
|
102
102
|
|
|
103
103
|
@dataclass
|
|
104
104
|
class PostgresMaterializedViewConfigChangeCollection:
|
|
105
|
-
indexes:
|
|
105
|
+
indexes: List[PostgresIndexConfigChange] = field(default_factory=list)
|
|
106
106
|
|
|
107
107
|
@property
|
|
108
108
|
def requires_full_refresh(self) -> bool:
|
|
@@ -110,4 +110,4 @@ class PostgresMaterializedViewConfigChangeCollection:
|
|
|
110
110
|
|
|
111
111
|
@property
|
|
112
112
|
def has_changes(self) -> bool:
|
|
113
|
-
return self.indexes !=
|
|
113
|
+
return self.indexes != []
|
|
@@ -30,13 +30,14 @@
|
|
|
30
30
|
|
|
31
31
|
{%- if _index_change.action == "drop" -%}
|
|
32
32
|
|
|
33
|
-
{{ postgres__get_drop_index_sql(relation, _index.name) }}
|
|
33
|
+
{{ postgres__get_drop_index_sql(relation, _index.name) }}
|
|
34
34
|
|
|
35
35
|
{%- elif _index_change.action == "create" -%}
|
|
36
36
|
|
|
37
37
|
{{ postgres__get_create_index_sql(relation, _index.as_node_config) }}
|
|
38
38
|
|
|
39
39
|
{%- endif -%}
|
|
40
|
+
{{ ';' if not loop.last else "" }}
|
|
40
41
|
|
|
41
42
|
{%- endfor -%}
|
|
42
43
|
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
create materialized view if not exists {{ relation }} as {{ sql }};
|
|
3
3
|
|
|
4
4
|
{% for _index_dict in config.get('indexes', []) -%}
|
|
5
|
-
{{- get_create_index_sql(relation, _index_dict) -}}
|
|
5
|
+
{{- get_create_index_sql(relation, _index_dict) -}}{{ ';' if not loop.last else "" }}
|
|
6
6
|
{%- endfor -%}
|
|
7
7
|
|
|
8
8
|
{% endmacro %}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: dbt-postgres
|
|
3
|
-
Version: 1.7.
|
|
3
|
+
Version: 1.7.15
|
|
4
4
|
Summary: The postgres adapter plugin for dbt (data build tool)
|
|
5
5
|
Home-page: https://github.com/dbt-labs/dbt-core
|
|
6
6
|
Author: dbt Labs
|
|
@@ -16,7 +16,7 @@ Classifier: Programming Language :: Python :: 3.10
|
|
|
16
16
|
Classifier: Programming Language :: Python :: 3.11
|
|
17
17
|
Requires-Python: >=3.8
|
|
18
18
|
Description-Content-Type: text/markdown
|
|
19
|
-
Requires-Dist: dbt-core==1.7.
|
|
19
|
+
Requires-Dist: dbt-core==1.7.15
|
|
20
20
|
Requires-Dist: psycopg2-binary~=2.8
|
|
21
21
|
Requires-Dist: agate
|
|
22
22
|
|
|
@@ -41,7 +41,7 @@ def _dbt_psycopg2_name():
|
|
|
41
41
|
|
|
42
42
|
|
|
43
43
|
package_name = "dbt-postgres"
|
|
44
|
-
package_version = "1.7.
|
|
44
|
+
package_version = "1.7.15"
|
|
45
45
|
description = """The postgres adapter plugin for dbt (data build tool)"""
|
|
46
46
|
|
|
47
47
|
this_directory = os.path.abspath(os.path.dirname(__file__))
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
version = "1.7.13"
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{dbt_postgres-1.7.13 → dbt_postgres-1.7.15}/dbt/adapters/postgres/relation_configs/__init__.py
RENAMED
|
File without changes
|
{dbt_postgres-1.7.13 → dbt_postgres-1.7.15}/dbt/adapters/postgres/relation_configs/constants.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{dbt_postgres-1.7.13 → dbt_postgres-1.7.15}/dbt/include/postgres/macros/relations/table/drop.sql
RENAMED
|
File without changes
|
{dbt_postgres-1.7.13 → dbt_postgres-1.7.15}/dbt/include/postgres/macros/relations/table/rename.sql
RENAMED
|
File without changes
|
{dbt_postgres-1.7.13 → dbt_postgres-1.7.15}/dbt/include/postgres/macros/relations/table/replace.sql
RENAMED
|
File without changes
|
{dbt_postgres-1.7.13 → dbt_postgres-1.7.15}/dbt/include/postgres/macros/relations/view/drop.sql
RENAMED
|
File without changes
|
{dbt_postgres-1.7.13 → dbt_postgres-1.7.15}/dbt/include/postgres/macros/relations/view/rename.sql
RENAMED
|
File without changes
|
{dbt_postgres-1.7.13 → dbt_postgres-1.7.15}/dbt/include/postgres/macros/relations/view/replace.sql
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{dbt_postgres-1.7.13 → dbt_postgres-1.7.15}/dbt/include/postgres/macros/utils/columns_spec_ddl.sql
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{dbt_postgres-1.7.13 → dbt_postgres-1.7.15}/dbt/include/postgres/macros/utils/split_part.sql
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|