dbt-adapters 1.14.3__tar.gz → 1.14.5__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.
Potentially problematic release.
This version of dbt-adapters might be problematic. Click here for more details.
- {dbt_adapters-1.14.3 → dbt_adapters-1.14.5}/.changes/1.14.3.md +0 -2
- dbt_adapters-1.14.5/.changes/1.14.4.md +9 -0
- dbt_adapters-1.14.5/.changes/1.14.5.md +9 -0
- {dbt_adapters-1.14.3 → dbt_adapters-1.14.5}/CHANGELOG.md +21 -2
- {dbt_adapters-1.14.3 → dbt_adapters-1.14.5}/PKG-INFO +1 -1
- dbt_adapters-1.14.5/src/dbt/adapters/__about__.py +1 -0
- {dbt_adapters-1.14.3 → dbt_adapters-1.14.5}/src/dbt/adapters/base/impl.py +11 -3
- {dbt_adapters-1.14.3 → dbt_adapters-1.14.5}/src/dbt/adapters/base/relation.py +1 -1
- {dbt_adapters-1.14.3 → dbt_adapters-1.14.5}/src/dbt/adapters/catalogs/__init__.py +1 -0
- {dbt_adapters-1.14.3 → dbt_adapters-1.14.5}/src/dbt/adapters/catalogs/_client.py +19 -19
- {dbt_adapters-1.14.3 → dbt_adapters-1.14.5}/src/dbt/adapters/catalogs/_integration.py +60 -25
- {dbt_adapters-1.14.3 → dbt_adapters-1.14.5}/src/dbt/adapters/contracts/relation.py +1 -1
- dbt_adapters-1.14.5/src/dbt/adapters/record/cursor/execute.py +39 -0
- {dbt_adapters-1.14.3 → dbt_adapters-1.14.5}/src/dbt/adapters/record/cursor/fetchall.py +3 -0
- {dbt_adapters-1.14.3 → dbt_adapters-1.14.5}/src/dbt/include/global_project/macros/materializations/models/incremental/incremental.sql +7 -4
- {dbt_adapters-1.14.3 → dbt_adapters-1.14.5}/src/dbt/include/global_project/macros/materializations/models/incremental/merge.sql +2 -2
- {dbt_adapters-1.14.3 → dbt_adapters-1.14.5}/src/dbt/include/global_project/macros/materializations/models/table.sql +2 -2
- {dbt_adapters-1.14.3 → dbt_adapters-1.14.5}/src/dbt/include/global_project/macros/python_model/python.sql +12 -1
- {dbt_adapters-1.14.3 → dbt_adapters-1.14.5}/tests/unit/fixtures/adapter.py +1 -1
- {dbt_adapters-1.14.3 → dbt_adapters-1.14.5}/tests/unit/test_catalogs.py +49 -4
- dbt_adapters-1.14.3/src/dbt/adapters/__about__.py +0 -1
- dbt_adapters-1.14.3/src/dbt/adapters/record/cursor/execute.py +0 -20
- {dbt_adapters-1.14.3 → dbt_adapters-1.14.5}/.changes/1.0.0.md +0 -0
- {dbt_adapters-1.14.3 → dbt_adapters-1.14.5}/.changes/1.1.0.md +0 -0
- {dbt_adapters-1.14.3 → dbt_adapters-1.14.5}/.changes/1.1.1.md +0 -0
- {dbt_adapters-1.14.3 → dbt_adapters-1.14.5}/.changes/1.10.0.md +0 -0
- {dbt_adapters-1.14.3 → dbt_adapters-1.14.5}/.changes/1.10.1.md +0 -0
- {dbt_adapters-1.14.3 → dbt_adapters-1.14.5}/.changes/1.10.2.md +0 -0
- {dbt_adapters-1.14.3 → dbt_adapters-1.14.5}/.changes/1.10.3.md +0 -0
- {dbt_adapters-1.14.3 → dbt_adapters-1.14.5}/.changes/1.10.4.md +0 -0
- {dbt_adapters-1.14.3 → dbt_adapters-1.14.5}/.changes/1.11.0.md +0 -0
- {dbt_adapters-1.14.3 → dbt_adapters-1.14.5}/.changes/1.12.0.md +0 -0
- {dbt_adapters-1.14.3 → dbt_adapters-1.14.5}/.changes/1.13.0.md +0 -0
- {dbt_adapters-1.14.3 → dbt_adapters-1.14.5}/.changes/1.13.1.md +0 -0
- {dbt_adapters-1.14.3 → dbt_adapters-1.14.5}/.changes/1.13.2.md +0 -0
- {dbt_adapters-1.14.3 → dbt_adapters-1.14.5}/.changes/1.14.0.md +0 -0
- {dbt_adapters-1.14.3 → dbt_adapters-1.14.5}/.changes/1.14.1.md +0 -0
- {dbt_adapters-1.14.3 → dbt_adapters-1.14.5}/.changes/1.2.1.md +0 -0
- {dbt_adapters-1.14.3 → dbt_adapters-1.14.5}/.changes/1.3.0.md +0 -0
- {dbt_adapters-1.14.3 → dbt_adapters-1.14.5}/.changes/1.3.1.md +0 -0
- {dbt_adapters-1.14.3 → dbt_adapters-1.14.5}/.changes/1.3.2.md +0 -0
- {dbt_adapters-1.14.3 → dbt_adapters-1.14.5}/.changes/1.3.3.md +0 -0
- {dbt_adapters-1.14.3 → dbt_adapters-1.14.5}/.changes/1.4.0.md +0 -0
- {dbt_adapters-1.14.3 → dbt_adapters-1.14.5}/.changes/1.4.1.md +0 -0
- {dbt_adapters-1.14.3 → dbt_adapters-1.14.5}/.changes/1.5.0.md +0 -0
- {dbt_adapters-1.14.3 → dbt_adapters-1.14.5}/.changes/1.6.0.md +0 -0
- {dbt_adapters-1.14.3 → dbt_adapters-1.14.5}/.changes/1.6.1.md +0 -0
- {dbt_adapters-1.14.3 → dbt_adapters-1.14.5}/.changes/1.7.0.md +0 -0
- {dbt_adapters-1.14.3 → dbt_adapters-1.14.5}/.changes/1.7.1.md +0 -0
- {dbt_adapters-1.14.3 → dbt_adapters-1.14.5}/.changes/1.7.2.md +0 -0
- {dbt_adapters-1.14.3 → dbt_adapters-1.14.5}/.changes/1.8.0.md +0 -0
- {dbt_adapters-1.14.3 → dbt_adapters-1.14.5}/.changes/1.9.0.md +0 -0
- {dbt_adapters-1.14.3 → dbt_adapters-1.14.5}/.changes/header.tpl.md +0 -0
- {dbt_adapters-1.14.3 → dbt_adapters-1.14.5}/.changes/unreleased/.gitkeep +0 -0
- {dbt_adapters-1.14.3 → dbt_adapters-1.14.5}/.changie.yaml +0 -0
- {dbt_adapters-1.14.3 → dbt_adapters-1.14.5}/.gitignore +0 -0
- {dbt_adapters-1.14.3 → dbt_adapters-1.14.5}/CONTRIBUTING.md +0 -0
- {dbt_adapters-1.14.3 → dbt_adapters-1.14.5}/LICENSE +0 -0
- {dbt_adapters-1.14.3 → dbt_adapters-1.14.5}/README.md +0 -0
- {dbt_adapters-1.14.3 → dbt_adapters-1.14.5}/hatch.toml +0 -0
- {dbt_adapters-1.14.3 → dbt_adapters-1.14.5}/pyproject.toml +0 -0
- {dbt_adapters-1.14.3 → dbt_adapters-1.14.5}/src/dbt/__init__.py +0 -0
- {dbt_adapters-1.14.3 → dbt_adapters-1.14.5}/src/dbt/adapters/__init__.py +0 -0
- {dbt_adapters-1.14.3 → dbt_adapters-1.14.5}/src/dbt/adapters/base/README.md +0 -0
- {dbt_adapters-1.14.3 → dbt_adapters-1.14.5}/src/dbt/adapters/base/__init__.py +0 -0
- {dbt_adapters-1.14.3 → dbt_adapters-1.14.5}/src/dbt/adapters/base/column.py +0 -0
- {dbt_adapters-1.14.3 → dbt_adapters-1.14.5}/src/dbt/adapters/base/connections.py +0 -0
- {dbt_adapters-1.14.3 → dbt_adapters-1.14.5}/src/dbt/adapters/base/meta.py +0 -0
- {dbt_adapters-1.14.3 → dbt_adapters-1.14.5}/src/dbt/adapters/base/plugin.py +0 -0
- {dbt_adapters-1.14.3 → dbt_adapters-1.14.5}/src/dbt/adapters/base/query_headers.py +0 -0
- {dbt_adapters-1.14.3 → dbt_adapters-1.14.5}/src/dbt/adapters/cache.py +0 -0
- {dbt_adapters-1.14.3 → dbt_adapters-1.14.5}/src/dbt/adapters/capability.py +0 -0
- {dbt_adapters-1.14.3 → dbt_adapters-1.14.5}/src/dbt/adapters/catalogs/_exceptions.py +0 -0
- {dbt_adapters-1.14.3 → dbt_adapters-1.14.5}/src/dbt/adapters/clients/__init__.py +0 -0
- {dbt_adapters-1.14.3 → dbt_adapters-1.14.5}/src/dbt/adapters/clients/jinja.py +0 -0
- {dbt_adapters-1.14.3 → dbt_adapters-1.14.5}/src/dbt/adapters/contracts/__init__.py +0 -0
- {dbt_adapters-1.14.3 → dbt_adapters-1.14.5}/src/dbt/adapters/contracts/connection.py +0 -0
- {dbt_adapters-1.14.3 → dbt_adapters-1.14.5}/src/dbt/adapters/contracts/macros.py +0 -0
- {dbt_adapters-1.14.3 → dbt_adapters-1.14.5}/src/dbt/adapters/events/README.md +0 -0
- {dbt_adapters-1.14.3 → dbt_adapters-1.14.5}/src/dbt/adapters/events/__init__.py +0 -0
- {dbt_adapters-1.14.3 → dbt_adapters-1.14.5}/src/dbt/adapters/events/adapter_types.proto +0 -0
- {dbt_adapters-1.14.3 → dbt_adapters-1.14.5}/src/dbt/adapters/events/adapter_types_pb2.py +0 -0
- {dbt_adapters-1.14.3 → dbt_adapters-1.14.5}/src/dbt/adapters/events/base_types.py +0 -0
- {dbt_adapters-1.14.3 → dbt_adapters-1.14.5}/src/dbt/adapters/events/logging.py +0 -0
- {dbt_adapters-1.14.3 → dbt_adapters-1.14.5}/src/dbt/adapters/events/types.py +0 -0
- {dbt_adapters-1.14.3 → dbt_adapters-1.14.5}/src/dbt/adapters/exceptions/__init__.py +0 -0
- {dbt_adapters-1.14.3 → dbt_adapters-1.14.5}/src/dbt/adapters/exceptions/alias.py +0 -0
- {dbt_adapters-1.14.3 → dbt_adapters-1.14.5}/src/dbt/adapters/exceptions/cache.py +0 -0
- {dbt_adapters-1.14.3 → dbt_adapters-1.14.5}/src/dbt/adapters/exceptions/compilation.py +0 -0
- {dbt_adapters-1.14.3 → dbt_adapters-1.14.5}/src/dbt/adapters/exceptions/connection.py +0 -0
- {dbt_adapters-1.14.3 → dbt_adapters-1.14.5}/src/dbt/adapters/exceptions/database.py +0 -0
- {dbt_adapters-1.14.3 → dbt_adapters-1.14.5}/src/dbt/adapters/factory.py +0 -0
- {dbt_adapters-1.14.3 → dbt_adapters-1.14.5}/src/dbt/adapters/protocol.py +0 -0
- {dbt_adapters-1.14.3 → dbt_adapters-1.14.5}/src/dbt/adapters/py.typed +0 -0
- {dbt_adapters-1.14.3 → dbt_adapters-1.14.5}/src/dbt/adapters/record/__init__.py +0 -0
- {dbt_adapters-1.14.3 → dbt_adapters-1.14.5}/src/dbt/adapters/record/base.py +0 -0
- {dbt_adapters-1.14.3 → dbt_adapters-1.14.5}/src/dbt/adapters/record/cursor/cursor.py +0 -0
- {dbt_adapters-1.14.3 → dbt_adapters-1.14.5}/src/dbt/adapters/record/cursor/description.py +0 -0
- {dbt_adapters-1.14.3 → dbt_adapters-1.14.5}/src/dbt/adapters/record/cursor/fetchmany.py +0 -0
- {dbt_adapters-1.14.3 → dbt_adapters-1.14.5}/src/dbt/adapters/record/cursor/fetchone.py +0 -0
- {dbt_adapters-1.14.3 → dbt_adapters-1.14.5}/src/dbt/adapters/record/cursor/rowcount.py +0 -0
- {dbt_adapters-1.14.3 → dbt_adapters-1.14.5}/src/dbt/adapters/record/handle.py +0 -0
- {dbt_adapters-1.14.3 → dbt_adapters-1.14.5}/src/dbt/adapters/record/serialization.py +0 -0
- {dbt_adapters-1.14.3 → dbt_adapters-1.14.5}/src/dbt/adapters/reference_keys.py +0 -0
- {dbt_adapters-1.14.3 → dbt_adapters-1.14.5}/src/dbt/adapters/relation_configs/README.md +0 -0
- {dbt_adapters-1.14.3 → dbt_adapters-1.14.5}/src/dbt/adapters/relation_configs/__init__.py +0 -0
- {dbt_adapters-1.14.3 → dbt_adapters-1.14.5}/src/dbt/adapters/relation_configs/config_base.py +0 -0
- {dbt_adapters-1.14.3 → dbt_adapters-1.14.5}/src/dbt/adapters/relation_configs/config_change.py +0 -0
- {dbt_adapters-1.14.3 → dbt_adapters-1.14.5}/src/dbt/adapters/relation_configs/config_validation.py +0 -0
- {dbt_adapters-1.14.3 → dbt_adapters-1.14.5}/src/dbt/adapters/sql/__init__.py +0 -0
- {dbt_adapters-1.14.3 → dbt_adapters-1.14.5}/src/dbt/adapters/sql/connections.py +0 -0
- {dbt_adapters-1.14.3 → dbt_adapters-1.14.5}/src/dbt/adapters/sql/impl.py +0 -0
- {dbt_adapters-1.14.3 → dbt_adapters-1.14.5}/src/dbt/adapters/utils.py +0 -0
- {dbt_adapters-1.14.3 → dbt_adapters-1.14.5}/src/dbt/include/__init__.py +0 -0
- {dbt_adapters-1.14.3 → dbt_adapters-1.14.5}/src/dbt/include/global_project/__init__.py +0 -0
- {dbt_adapters-1.14.3 → dbt_adapters-1.14.5}/src/dbt/include/global_project/dbt_project.yml +0 -0
- {dbt_adapters-1.14.3 → dbt_adapters-1.14.5}/src/dbt/include/global_project/docs/overview.md +0 -0
- {dbt_adapters-1.14.3 → dbt_adapters-1.14.5}/src/dbt/include/global_project/macros/adapters/apply_grants.sql +0 -0
- {dbt_adapters-1.14.3 → dbt_adapters-1.14.5}/src/dbt/include/global_project/macros/adapters/columns.sql +0 -0
- {dbt_adapters-1.14.3 → dbt_adapters-1.14.5}/src/dbt/include/global_project/macros/adapters/freshness.sql +0 -0
- {dbt_adapters-1.14.3 → dbt_adapters-1.14.5}/src/dbt/include/global_project/macros/adapters/indexes.sql +0 -0
- {dbt_adapters-1.14.3 → dbt_adapters-1.14.5}/src/dbt/include/global_project/macros/adapters/metadata.sql +0 -0
- {dbt_adapters-1.14.3 → dbt_adapters-1.14.5}/src/dbt/include/global_project/macros/adapters/persist_docs.sql +0 -0
- {dbt_adapters-1.14.3 → dbt_adapters-1.14.5}/src/dbt/include/global_project/macros/adapters/relation.sql +0 -0
- {dbt_adapters-1.14.3 → dbt_adapters-1.14.5}/src/dbt/include/global_project/macros/adapters/schema.sql +0 -0
- {dbt_adapters-1.14.3 → dbt_adapters-1.14.5}/src/dbt/include/global_project/macros/adapters/show.sql +0 -0
- {dbt_adapters-1.14.3 → dbt_adapters-1.14.5}/src/dbt/include/global_project/macros/adapters/timestamps.sql +0 -0
- {dbt_adapters-1.14.3 → dbt_adapters-1.14.5}/src/dbt/include/global_project/macros/adapters/validate_sql.sql +0 -0
- {dbt_adapters-1.14.3 → dbt_adapters-1.14.5}/src/dbt/include/global_project/macros/etc/datetime.sql +0 -0
- {dbt_adapters-1.14.3 → dbt_adapters-1.14.5}/src/dbt/include/global_project/macros/etc/statement.sql +0 -0
- {dbt_adapters-1.14.3 → dbt_adapters-1.14.5}/src/dbt/include/global_project/macros/generic_test_sql/accepted_values.sql +0 -0
- {dbt_adapters-1.14.3 → dbt_adapters-1.14.5}/src/dbt/include/global_project/macros/generic_test_sql/not_null.sql +0 -0
- {dbt_adapters-1.14.3 → dbt_adapters-1.14.5}/src/dbt/include/global_project/macros/generic_test_sql/relationships.sql +0 -0
- {dbt_adapters-1.14.3 → dbt_adapters-1.14.5}/src/dbt/include/global_project/macros/generic_test_sql/unique.sql +0 -0
- {dbt_adapters-1.14.3 → dbt_adapters-1.14.5}/src/dbt/include/global_project/macros/get_custom_name/get_custom_alias.sql +0 -0
- {dbt_adapters-1.14.3 → dbt_adapters-1.14.5}/src/dbt/include/global_project/macros/get_custom_name/get_custom_database.sql +0 -0
- {dbt_adapters-1.14.3 → dbt_adapters-1.14.5}/src/dbt/include/global_project/macros/get_custom_name/get_custom_schema.sql +0 -0
- {dbt_adapters-1.14.3 → dbt_adapters-1.14.5}/src/dbt/include/global_project/macros/materializations/configs.sql +0 -0
- {dbt_adapters-1.14.3 → dbt_adapters-1.14.5}/src/dbt/include/global_project/macros/materializations/hooks.sql +0 -0
- {dbt_adapters-1.14.3 → dbt_adapters-1.14.5}/src/dbt/include/global_project/macros/materializations/models/clone/can_clone_table.sql +0 -0
- {dbt_adapters-1.14.3 → dbt_adapters-1.14.5}/src/dbt/include/global_project/macros/materializations/models/clone/clone.sql +0 -0
- {dbt_adapters-1.14.3 → dbt_adapters-1.14.5}/src/dbt/include/global_project/macros/materializations/models/clone/create_or_replace_clone.sql +0 -0
- {dbt_adapters-1.14.3 → dbt_adapters-1.14.5}/src/dbt/include/global_project/macros/materializations/models/incremental/column_helpers.sql +0 -0
- {dbt_adapters-1.14.3 → dbt_adapters-1.14.5}/src/dbt/include/global_project/macros/materializations/models/incremental/is_incremental.sql +0 -0
- {dbt_adapters-1.14.3 → dbt_adapters-1.14.5}/src/dbt/include/global_project/macros/materializations/models/incremental/on_schema_change.sql +0 -0
- {dbt_adapters-1.14.3 → dbt_adapters-1.14.5}/src/dbt/include/global_project/macros/materializations/models/incremental/strategies.sql +0 -0
- {dbt_adapters-1.14.3 → dbt_adapters-1.14.5}/src/dbt/include/global_project/macros/materializations/models/materialized_view.sql +0 -0
- {dbt_adapters-1.14.3 → dbt_adapters-1.14.5}/src/dbt/include/global_project/macros/materializations/models/view.sql +0 -0
- {dbt_adapters-1.14.3 → dbt_adapters-1.14.5}/src/dbt/include/global_project/macros/materializations/seeds/helpers.sql +0 -0
- {dbt_adapters-1.14.3 → dbt_adapters-1.14.5}/src/dbt/include/global_project/macros/materializations/seeds/seed.sql +0 -0
- {dbt_adapters-1.14.3 → dbt_adapters-1.14.5}/src/dbt/include/global_project/macros/materializations/snapshots/helpers.sql +0 -0
- {dbt_adapters-1.14.3 → dbt_adapters-1.14.5}/src/dbt/include/global_project/macros/materializations/snapshots/snapshot.sql +0 -0
- {dbt_adapters-1.14.3 → dbt_adapters-1.14.5}/src/dbt/include/global_project/macros/materializations/snapshots/snapshot_merge.sql +0 -0
- {dbt_adapters-1.14.3 → dbt_adapters-1.14.5}/src/dbt/include/global_project/macros/materializations/snapshots/strategies.sql +0 -0
- {dbt_adapters-1.14.3 → dbt_adapters-1.14.5}/src/dbt/include/global_project/macros/materializations/tests/helpers.sql +0 -0
- {dbt_adapters-1.14.3 → dbt_adapters-1.14.5}/src/dbt/include/global_project/macros/materializations/tests/test.sql +0 -0
- {dbt_adapters-1.14.3 → dbt_adapters-1.14.5}/src/dbt/include/global_project/macros/materializations/tests/unit.sql +0 -0
- {dbt_adapters-1.14.3 → dbt_adapters-1.14.5}/src/dbt/include/global_project/macros/materializations/tests/where_subquery.sql +0 -0
- {dbt_adapters-1.14.3 → dbt_adapters-1.14.5}/src/dbt/include/global_project/macros/relations/column/columns_spec_ddl.sql +0 -0
- {dbt_adapters-1.14.3 → dbt_adapters-1.14.5}/src/dbt/include/global_project/macros/relations/create.sql +0 -0
- {dbt_adapters-1.14.3 → dbt_adapters-1.14.5}/src/dbt/include/global_project/macros/relations/create_backup.sql +0 -0
- {dbt_adapters-1.14.3 → dbt_adapters-1.14.5}/src/dbt/include/global_project/macros/relations/create_intermediate.sql +0 -0
- {dbt_adapters-1.14.3 → dbt_adapters-1.14.5}/src/dbt/include/global_project/macros/relations/drop.sql +0 -0
- {dbt_adapters-1.14.3 → dbt_adapters-1.14.5}/src/dbt/include/global_project/macros/relations/drop_backup.sql +0 -0
- {dbt_adapters-1.14.3 → dbt_adapters-1.14.5}/src/dbt/include/global_project/macros/relations/materialized_view/alter.sql +0 -0
- {dbt_adapters-1.14.3 → dbt_adapters-1.14.5}/src/dbt/include/global_project/macros/relations/materialized_view/create.sql +0 -0
- {dbt_adapters-1.14.3 → dbt_adapters-1.14.5}/src/dbt/include/global_project/macros/relations/materialized_view/drop.sql +0 -0
- {dbt_adapters-1.14.3 → dbt_adapters-1.14.5}/src/dbt/include/global_project/macros/relations/materialized_view/refresh.sql +0 -0
- {dbt_adapters-1.14.3 → dbt_adapters-1.14.5}/src/dbt/include/global_project/macros/relations/materialized_view/rename.sql +0 -0
- {dbt_adapters-1.14.3 → dbt_adapters-1.14.5}/src/dbt/include/global_project/macros/relations/materialized_view/replace.sql +0 -0
- {dbt_adapters-1.14.3 → dbt_adapters-1.14.5}/src/dbt/include/global_project/macros/relations/rename.sql +0 -0
- {dbt_adapters-1.14.3 → dbt_adapters-1.14.5}/src/dbt/include/global_project/macros/relations/rename_intermediate.sql +0 -0
- {dbt_adapters-1.14.3 → dbt_adapters-1.14.5}/src/dbt/include/global_project/macros/relations/replace.sql +0 -0
- {dbt_adapters-1.14.3 → dbt_adapters-1.14.5}/src/dbt/include/global_project/macros/relations/schema.sql +0 -0
- {dbt_adapters-1.14.3 → dbt_adapters-1.14.5}/src/dbt/include/global_project/macros/relations/table/create.sql +0 -0
- {dbt_adapters-1.14.3 → dbt_adapters-1.14.5}/src/dbt/include/global_project/macros/relations/table/drop.sql +0 -0
- {dbt_adapters-1.14.3 → dbt_adapters-1.14.5}/src/dbt/include/global_project/macros/relations/table/rename.sql +0 -0
- {dbt_adapters-1.14.3 → dbt_adapters-1.14.5}/src/dbt/include/global_project/macros/relations/table/replace.sql +0 -0
- {dbt_adapters-1.14.3 → dbt_adapters-1.14.5}/src/dbt/include/global_project/macros/relations/view/create.sql +0 -0
- {dbt_adapters-1.14.3 → dbt_adapters-1.14.5}/src/dbt/include/global_project/macros/relations/view/drop.sql +0 -0
- {dbt_adapters-1.14.3 → dbt_adapters-1.14.5}/src/dbt/include/global_project/macros/relations/view/rename.sql +0 -0
- {dbt_adapters-1.14.3 → dbt_adapters-1.14.5}/src/dbt/include/global_project/macros/relations/view/replace.sql +0 -0
- {dbt_adapters-1.14.3 → dbt_adapters-1.14.5}/src/dbt/include/global_project/macros/unit_test_sql/get_fixture_sql.sql +0 -0
- {dbt_adapters-1.14.3 → dbt_adapters-1.14.5}/src/dbt/include/global_project/macros/utils/any_value.sql +0 -0
- {dbt_adapters-1.14.3 → dbt_adapters-1.14.5}/src/dbt/include/global_project/macros/utils/array_append.sql +0 -0
- {dbt_adapters-1.14.3 → dbt_adapters-1.14.5}/src/dbt/include/global_project/macros/utils/array_concat.sql +0 -0
- {dbt_adapters-1.14.3 → dbt_adapters-1.14.5}/src/dbt/include/global_project/macros/utils/array_construct.sql +0 -0
- {dbt_adapters-1.14.3 → dbt_adapters-1.14.5}/src/dbt/include/global_project/macros/utils/bool_or.sql +0 -0
- {dbt_adapters-1.14.3 → dbt_adapters-1.14.5}/src/dbt/include/global_project/macros/utils/cast.sql +0 -0
- {dbt_adapters-1.14.3 → dbt_adapters-1.14.5}/src/dbt/include/global_project/macros/utils/cast_bool_to_text.sql +0 -0
- {dbt_adapters-1.14.3 → dbt_adapters-1.14.5}/src/dbt/include/global_project/macros/utils/concat.sql +0 -0
- {dbt_adapters-1.14.3 → dbt_adapters-1.14.5}/src/dbt/include/global_project/macros/utils/data_types.sql +0 -0
- {dbt_adapters-1.14.3 → dbt_adapters-1.14.5}/src/dbt/include/global_project/macros/utils/date.sql +0 -0
- {dbt_adapters-1.14.3 → dbt_adapters-1.14.5}/src/dbt/include/global_project/macros/utils/date_spine.sql +0 -0
- {dbt_adapters-1.14.3 → dbt_adapters-1.14.5}/src/dbt/include/global_project/macros/utils/date_trunc.sql +0 -0
- {dbt_adapters-1.14.3 → dbt_adapters-1.14.5}/src/dbt/include/global_project/macros/utils/dateadd.sql +0 -0
- {dbt_adapters-1.14.3 → dbt_adapters-1.14.5}/src/dbt/include/global_project/macros/utils/datediff.sql +0 -0
- {dbt_adapters-1.14.3 → dbt_adapters-1.14.5}/src/dbt/include/global_project/macros/utils/equals.sql +0 -0
- {dbt_adapters-1.14.3 → dbt_adapters-1.14.5}/src/dbt/include/global_project/macros/utils/escape_single_quotes.sql +0 -0
- {dbt_adapters-1.14.3 → dbt_adapters-1.14.5}/src/dbt/include/global_project/macros/utils/except.sql +0 -0
- {dbt_adapters-1.14.3 → dbt_adapters-1.14.5}/src/dbt/include/global_project/macros/utils/generate_series.sql +0 -0
- {dbt_adapters-1.14.3 → dbt_adapters-1.14.5}/src/dbt/include/global_project/macros/utils/hash.sql +0 -0
- {dbt_adapters-1.14.3 → dbt_adapters-1.14.5}/src/dbt/include/global_project/macros/utils/intersect.sql +0 -0
- {dbt_adapters-1.14.3 → dbt_adapters-1.14.5}/src/dbt/include/global_project/macros/utils/last_day.sql +0 -0
- {dbt_adapters-1.14.3 → dbt_adapters-1.14.5}/src/dbt/include/global_project/macros/utils/length.sql +0 -0
- {dbt_adapters-1.14.3 → dbt_adapters-1.14.5}/src/dbt/include/global_project/macros/utils/listagg.sql +0 -0
- {dbt_adapters-1.14.3 → dbt_adapters-1.14.5}/src/dbt/include/global_project/macros/utils/literal.sql +0 -0
- {dbt_adapters-1.14.3 → dbt_adapters-1.14.5}/src/dbt/include/global_project/macros/utils/position.sql +0 -0
- {dbt_adapters-1.14.3 → dbt_adapters-1.14.5}/src/dbt/include/global_project/macros/utils/replace.sql +0 -0
- {dbt_adapters-1.14.3 → dbt_adapters-1.14.5}/src/dbt/include/global_project/macros/utils/right.sql +0 -0
- {dbt_adapters-1.14.3 → dbt_adapters-1.14.5}/src/dbt/include/global_project/macros/utils/safe_cast.sql +0 -0
- {dbt_adapters-1.14.3 → dbt_adapters-1.14.5}/src/dbt/include/global_project/macros/utils/split_part.sql +0 -0
- {dbt_adapters-1.14.3 → dbt_adapters-1.14.5}/src/dbt/include/global_project/tests/generic/builtin.sql +0 -0
- {dbt_adapters-1.14.3 → dbt_adapters-1.14.5}/src/dbt/include/py.typed +0 -0
- {dbt_adapters-1.14.3 → dbt_adapters-1.14.5}/tests/__init__.py +0 -0
- {dbt_adapters-1.14.3 → dbt_adapters-1.14.5}/tests/unit/behavior_flag_tests/__init__.py +0 -0
- {dbt_adapters-1.14.3 → dbt_adapters-1.14.5}/tests/unit/behavior_flag_tests/test_behavior_flags.py +0 -0
- {dbt_adapters-1.14.3 → dbt_adapters-1.14.5}/tests/unit/behavior_flag_tests/test_empty_project.py +0 -0
- {dbt_adapters-1.14.3 → dbt_adapters-1.14.5}/tests/unit/conftest.py +0 -0
- {dbt_adapters-1.14.3 → dbt_adapters-1.14.5}/tests/unit/fixtures/__init__.py +0 -0
- {dbt_adapters-1.14.3 → dbt_adapters-1.14.5}/tests/unit/fixtures/catalog_integration.py +0 -0
- {dbt_adapters-1.14.3 → dbt_adapters-1.14.5}/tests/unit/fixtures/connection_manager.py +0 -0
- {dbt_adapters-1.14.3 → dbt_adapters-1.14.5}/tests/unit/fixtures/credentials.py +0 -0
- {dbt_adapters-1.14.3 → dbt_adapters-1.14.5}/tests/unit/test_adapter_factory.py +0 -0
- {dbt_adapters-1.14.3 → dbt_adapters-1.14.5}/tests/unit/test_adapter_telemetry.py +0 -0
- {dbt_adapters-1.14.3 → dbt_adapters-1.14.5}/tests/unit/test_base_adapter.py +0 -0
- {dbt_adapters-1.14.3 → dbt_adapters-1.14.5}/tests/unit/test_cache.py +0 -0
- {dbt_adapters-1.14.3 → dbt_adapters-1.14.5}/tests/unit/test_column.py +0 -0
- {dbt_adapters-1.14.3 → dbt_adapters-1.14.5}/tests/unit/test_events.py +0 -0
- {dbt_adapters-1.14.3 → dbt_adapters-1.14.5}/tests/unit/test_relation.py +0 -0
- {dbt_adapters-1.14.3 → dbt_adapters-1.14.5}/tests/unit/test_sql_result.py +0 -0
|
@@ -12,5 +12,3 @@
|
|
|
12
12
|
|
|
13
13
|
- Add node_checksum to NodeInfo in structured logs ([#883](https://github.com/dbt-labs/dbt-adapters/issues/883))
|
|
14
14
|
- Make use of new record/replay features to enable recording "available" functions ([#761](https://github.com/dbt-labs/dbt-adapters/issues/761))
|
|
15
|
-
|
|
16
|
-
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
## dbt-adapters 1.14.4 - March 31, 2025
|
|
2
|
+
|
|
3
|
+
### Features
|
|
4
|
+
|
|
5
|
+
- Make source and target tables able to be referenced via DBT_INTERNAL_DEST and DBT_INTERNAL_SOURCE for the delete/insert incremental strategy ([#910](https://github.com/dbt-labs/dbt-adapters/issues/910))
|
|
6
|
+
|
|
7
|
+
### Fixes
|
|
8
|
+
|
|
9
|
+
- Fix the python model empty/sample mode fix to not break when the ref macro has been overridden ([#953](https://github.com/dbt-labs/dbt-adapters/issues/953))
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
## dbt-adapters 1.14.5 - April 07, 2025
|
|
2
|
+
|
|
3
|
+
### Fixes
|
|
4
|
+
|
|
5
|
+
- Create indexes on the intermediate relation before the swap ([#966](https://github.com/dbt-labs/dbt-adapters/issues/966))
|
|
6
|
+
- Create indexes on the intermediate relation before the swap for incremental models ([#966](https://github.com/dbt-labs/dbt-adapters/issues/966))
|
|
7
|
+
|
|
8
|
+
### Contributors
|
|
9
|
+
- [@etx121](https://github.com/etx121) ([#966](https://github.com/dbt-labs/dbt-adapters/issues/966), [#966](https://github.com/dbt-labs/dbt-adapters/issues/966))
|
|
@@ -10,6 +10,27 @@ and is generated by [Changie](https://github.com/miniscruff/changie)
|
|
|
10
10
|
- Do not edit this file directly. This file is auto-generated using [changie](https://github.com/miniscruff/changie)
|
|
11
11
|
- For details on how to document a change, see the [contributing guide](/CONTRIBUTING.md#changelog-entry)
|
|
12
12
|
|
|
13
|
+
## dbt-adapters 1.14.5 - April 07, 2025
|
|
14
|
+
|
|
15
|
+
### Fixes
|
|
16
|
+
|
|
17
|
+
- Create indexes on the intermediate relation before the swap ([#966](https://github.com/dbt-labs/dbt-adapters/issues/966))
|
|
18
|
+
- Create indexes on the intermediate relation before the swap for incremental models ([#966](https://github.com/dbt-labs/dbt-adapters/issues/966))
|
|
19
|
+
|
|
20
|
+
### Contributors
|
|
21
|
+
- [@etx121](https://github.com/etx121) ([#966](https://github.com/dbt-labs/dbt-adapters/issues/966), [#966](https://github.com/dbt-labs/dbt-adapters/issues/966))
|
|
22
|
+
|
|
23
|
+
|
|
24
|
+
## dbt-adapters 1.14.4 - March 31, 2025
|
|
25
|
+
|
|
26
|
+
### Features
|
|
27
|
+
|
|
28
|
+
- Make source and target tables able to be referenced via DBT_INTERNAL_DEST and DBT_INTERNAL_SOURCE for the delete/insert incremental strategy ([#910](https://github.com/dbt-labs/dbt-adapters/issues/910))
|
|
29
|
+
|
|
30
|
+
### Fixes
|
|
31
|
+
|
|
32
|
+
- Fix the python model empty/sample mode fix to not break when the ref macro has been overridden ([#953](https://github.com/dbt-labs/dbt-adapters/issues/953))
|
|
33
|
+
|
|
13
34
|
## dbt-adapters 1.14.3 - March 19, 2025
|
|
14
35
|
|
|
15
36
|
### Features
|
|
@@ -25,8 +46,6 @@ and is generated by [Changie](https://github.com/miniscruff/changie)
|
|
|
25
46
|
- Add node_checksum to NodeInfo in structured logs ([#883](https://github.com/dbt-labs/dbt-adapters/issues/883))
|
|
26
47
|
- Make use of new record/replay features to enable recording "available" functions ([#761](https://github.com/dbt-labs/dbt-adapters/issues/761))
|
|
27
48
|
|
|
28
|
-
|
|
29
|
-
|
|
30
49
|
## dbt-adapters 1.14.1 - March 04, 2025
|
|
31
50
|
|
|
32
51
|
### Fixes
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: dbt-adapters
|
|
3
|
-
Version: 1.14.
|
|
3
|
+
Version: 1.14.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
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
version = "1.14.5"
|
|
@@ -77,6 +77,7 @@ from dbt.adapters.catalogs import (
|
|
|
77
77
|
CatalogIntegration,
|
|
78
78
|
CatalogIntegrationClient,
|
|
79
79
|
CatalogIntegrationConfig,
|
|
80
|
+
CatalogRelation,
|
|
80
81
|
)
|
|
81
82
|
from dbt.adapters.contracts.connection import Credentials
|
|
82
83
|
from dbt.adapters.contracts.macros import MacroResolverProtocol
|
|
@@ -283,7 +284,7 @@ class BaseAdapter(metaclass=AdapterMeta):
|
|
|
283
284
|
Relation: Type[BaseRelation] = BaseRelation
|
|
284
285
|
Column: Type[BaseColumn] = BaseColumn
|
|
285
286
|
ConnectionManager: Type[BaseConnectionManager]
|
|
286
|
-
CATALOG_INTEGRATIONS:
|
|
287
|
+
CATALOG_INTEGRATIONS: Iterable[Type[CatalogIntegration]] = []
|
|
287
288
|
|
|
288
289
|
# A set of clobber config fields accepted by this adapter
|
|
289
290
|
# for use in materializations
|
|
@@ -312,13 +313,20 @@ class BaseAdapter(metaclass=AdapterMeta):
|
|
|
312
313
|
self.behavior = DEFAULT_BASE_BEHAVIOR_FLAGS # type: ignore
|
|
313
314
|
self._catalog_client = CatalogIntegrationClient(self.CATALOG_INTEGRATIONS)
|
|
314
315
|
|
|
315
|
-
def add_catalog_integration(
|
|
316
|
-
|
|
316
|
+
def add_catalog_integration(
|
|
317
|
+
self, catalog_integration: CatalogIntegrationConfig
|
|
318
|
+
) -> CatalogIntegration:
|
|
319
|
+
return self._catalog_client.add(catalog_integration)
|
|
317
320
|
|
|
318
321
|
@available
|
|
319
322
|
def get_catalog_integration(self, name: str) -> CatalogIntegration:
|
|
320
323
|
return self._catalog_client.get(name)
|
|
321
324
|
|
|
325
|
+
@available
|
|
326
|
+
def build_catalog_relation(self, config: RelationConfig) -> CatalogRelation:
|
|
327
|
+
catalog = self.get_catalog_integration(config.catalog)
|
|
328
|
+
return catalog.build_relation(config)
|
|
329
|
+
|
|
322
330
|
###
|
|
323
331
|
# Methods to set / access a macro resolver
|
|
324
332
|
###
|
|
@@ -60,7 +60,7 @@ class BaseRelation(FakeAPIObject, Hashable):
|
|
|
60
60
|
require_alias: bool = (
|
|
61
61
|
True # used to govern whether to add an alias when render_limited is called
|
|
62
62
|
)
|
|
63
|
-
|
|
63
|
+
catalog: Optional[str] = None
|
|
64
64
|
|
|
65
65
|
# register relation types that can be renamed for the purpose of replacing relations using stages and backups
|
|
66
66
|
# adding a relation type here also requires defining the associated rename macro
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
from typing import Dict, Type
|
|
1
|
+
from typing import Dict, Iterable, Type
|
|
2
2
|
|
|
3
3
|
from dbt.adapters.catalogs._exceptions import (
|
|
4
4
|
DbtCatalogIntegrationAlreadyExistsError,
|
|
@@ -26,29 +26,29 @@ class CatalogIntegrationClient:
|
|
|
26
26
|
integration names mapped to their instances
|
|
27
27
|
"""
|
|
28
28
|
|
|
29
|
-
def __init__(self, supported_catalogs:
|
|
30
|
-
self.__supported_catalogs =
|
|
29
|
+
def __init__(self, supported_catalogs: Iterable[Type[CatalogIntegration]]):
|
|
30
|
+
self.__supported_catalogs: Dict[str, Type[CatalogIntegration]] = {
|
|
31
|
+
catalog.catalog_type: catalog for catalog in supported_catalogs
|
|
32
|
+
}
|
|
31
33
|
self.__catalog_integrations: Dict[str, CatalogIntegration] = {}
|
|
32
34
|
|
|
33
|
-
def add(self,
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
)
|
|
40
|
-
|
|
41
|
-
if catalog_integration.name in self.__catalog_integrations.keys():
|
|
42
|
-
raise DbtCatalogIntegrationAlreadyExistsError(catalog_integration.name)
|
|
43
|
-
|
|
44
|
-
self.__catalog_integrations[catalog_integration.name] = catalog_factory(
|
|
45
|
-
catalog_integration
|
|
46
|
-
)
|
|
47
|
-
|
|
48
|
-
return self.get(catalog_integration.name)
|
|
35
|
+
def add(self, config: CatalogIntegrationConfig) -> CatalogIntegration:
|
|
36
|
+
factory = self.__catalog_integration_factory(config.catalog_type)
|
|
37
|
+
if config.name in self.__catalog_integrations:
|
|
38
|
+
raise DbtCatalogIntegrationAlreadyExistsError(config.name)
|
|
39
|
+
self.__catalog_integrations[config.name] = factory(config)
|
|
40
|
+
return self.get(config.name)
|
|
49
41
|
|
|
50
42
|
def get(self, name: str) -> CatalogIntegration:
|
|
51
43
|
try:
|
|
52
44
|
return self.__catalog_integrations[name]
|
|
53
45
|
except KeyError:
|
|
54
46
|
raise DbtCatalogIntegrationNotFoundError(name, self.__catalog_integrations.keys())
|
|
47
|
+
|
|
48
|
+
def __catalog_integration_factory(self, catalog_type: str) -> Type[CatalogIntegration]:
|
|
49
|
+
try:
|
|
50
|
+
return self.__supported_catalogs[catalog_type]
|
|
51
|
+
except KeyError as e:
|
|
52
|
+
raise DbtCatalogIntegrationNotSupportedError(
|
|
53
|
+
catalog_type, self.__supported_catalogs.keys()
|
|
54
|
+
) from e
|
|
@@ -1,7 +1,9 @@
|
|
|
1
|
-
|
|
1
|
+
import abc
|
|
2
2
|
from typing import Any, Dict, Optional
|
|
3
3
|
from typing_extensions import Protocol
|
|
4
4
|
|
|
5
|
+
from dbt.adapters.contracts.relation import RelationConfig
|
|
6
|
+
|
|
5
7
|
|
|
6
8
|
class CatalogIntegrationConfig(Protocol):
|
|
7
9
|
"""
|
|
@@ -14,62 +16,95 @@ class CatalogIntegrationConfig(Protocol):
|
|
|
14
16
|
ensuring a standardized structure and attributes are in place.
|
|
15
17
|
|
|
16
18
|
Attributes:
|
|
17
|
-
name (str): the name of the catalog integration in the
|
|
18
|
-
-
|
|
19
|
-
- expected to be unique within the adapter, if not the entire data platform
|
|
19
|
+
name (str): the name of the catalog integration in the dbt project, e.g. "my_iceberg_operational_data"
|
|
20
|
+
- a unique name for this catalog integration to be referenced in a model configuration
|
|
20
21
|
catalog_type (str): the type of the catalog integration in the data platform, e.g. "iceberg_rest"
|
|
21
22
|
- this is required for dbt to determine the correct method for parsing user configuration
|
|
22
23
|
- usually a combination of the catalog and the way in which the data platform interacts with it
|
|
24
|
+
catalog_name (Optional[str]): the name of the catalog integration in the data platform, e.g. "my_favorite_iceberg_catalog"
|
|
25
|
+
- this is required for dbt to correctly reference catalogs by name from model configuration
|
|
26
|
+
- expected to be unique within the data platform, but many dbt catalog integrations can share the same catalog name
|
|
23
27
|
table_format (Optional[str]): the table format this catalog uses
|
|
24
28
|
- this is commonly unique to each catalog type, and should only be required from the user for catalogs that support multiple formats
|
|
25
29
|
external_volume (Optional[str]): external storage volume identifier
|
|
26
30
|
- while this is a separate concept from catalogs, we feel it is more user-friendly to group it with the catalog configuration
|
|
31
|
+
- it's possible to use a default external volume at the user, database, or account level, hence this is optional
|
|
27
32
|
- a result of this grouping is that there can only be one external volume per catalog integration, but many catalogs can share the same volume
|
|
33
|
+
- a user should create a new dbt catalog if they want to use a different external volume for a given catalog integration
|
|
28
34
|
adapter_properties (Optional[Dict[str, Any]]):
|
|
29
35
|
- additional, adapter-specific properties are nested here to avoid future collision when expanding the catalog integration protocol
|
|
30
36
|
"""
|
|
31
37
|
|
|
32
38
|
name: str
|
|
33
39
|
catalog_type: str
|
|
40
|
+
catalog_name: Optional[str]
|
|
34
41
|
table_format: Optional[str]
|
|
35
42
|
external_volume: Optional[str]
|
|
36
|
-
adapter_properties:
|
|
43
|
+
adapter_properties: Dict[str, Any]
|
|
37
44
|
|
|
38
45
|
|
|
39
|
-
class
|
|
40
|
-
|
|
41
|
-
|
|
46
|
+
class CatalogRelation(Protocol):
|
|
47
|
+
catalog_name: Optional[str]
|
|
48
|
+
table_format: Optional[str]
|
|
49
|
+
external_volume: Optional[str]
|
|
42
50
|
|
|
43
51
|
|
|
44
|
-
class CatalogIntegration:
|
|
52
|
+
class CatalogIntegration(abc.ABC):
|
|
45
53
|
"""
|
|
46
54
|
Represent a catalog integration for a given user config
|
|
47
55
|
|
|
48
|
-
This class should be
|
|
56
|
+
This class should be implemented by specific catalog integration types in an adapter.
|
|
49
57
|
A catalog integration is a specific platform's way of interacting with a specific catalog.
|
|
50
58
|
|
|
51
59
|
Attributes:
|
|
52
|
-
name (str): the name of the catalog integration in the
|
|
53
|
-
-
|
|
54
|
-
- expected to be unique within the adapter, if not the entire data platform
|
|
60
|
+
name (str): the name of the catalog integration in the dbt project, e.g. "my_iceberg_operational_data"
|
|
61
|
+
- a unique name for this catalog integration to be referenced in a model configuration
|
|
55
62
|
catalog_type (str): the type of the catalog integration in the data platform, e.g. "iceberg_rest"
|
|
56
|
-
- this is
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
-
|
|
60
|
-
- this is determined by the catalog integration type, hence it is a class attribute
|
|
63
|
+
- this is a name for this particular implementation of the catalog integration, hence it is a class attribute
|
|
64
|
+
catalog_name (Optional[str]): the name of the catalog integration in the data platform, e.g. "my_favorite_iceberg_catalog"
|
|
65
|
+
- this is required for dbt to correctly reference catalogs by name from model configuration
|
|
66
|
+
- expected to be unique within the data platform, but many dbt catalog integrations can share the same catalog name
|
|
61
67
|
table_format (Optional[str]): the table format this catalog uses
|
|
62
|
-
- this is commonly
|
|
63
|
-
- it should only be required from the user for catalogs that support multiple formats
|
|
68
|
+
- this is commonly unique to each catalog type, and should only be required from the user for catalogs that support multiple formats
|
|
64
69
|
external_volume (Optional[str]): external storage volume identifier
|
|
65
70
|
- while this is a separate concept from catalogs, we feel it is more user-friendly to group it with the catalog configuration
|
|
71
|
+
- it's possible to use a default external volume at the user, database, or account level, hence this is optional
|
|
66
72
|
- a result of this grouping is that there can only be one external volume per catalog integration, but many catalogs can share the same volume
|
|
73
|
+
- a user should create a new dbt catalog if they want to use a different external volume for a given catalog integration
|
|
74
|
+
allows_writes (bool): identifies whether this catalog integration supports writes
|
|
75
|
+
- this is required for dbt to correctly identify whether a catalog is writable during parse time
|
|
76
|
+
- this is determined by the catalog integration type, hence it is a class attribute
|
|
67
77
|
"""
|
|
68
78
|
|
|
69
|
-
|
|
79
|
+
catalog_type: str
|
|
80
|
+
table_format: Optional[str] = None
|
|
81
|
+
allows_writes: bool = False
|
|
82
|
+
|
|
83
|
+
def __init__(self, config: CatalogIntegrationConfig) -> None:
|
|
84
|
+
# table_format is often fixed for a catalog type, allow it to be defined at the class level
|
|
85
|
+
if config.table_format is not None:
|
|
86
|
+
self.table_format = config.table_format
|
|
70
87
|
|
|
71
|
-
def __init__(self, config: CatalogIntegrationConfig):
|
|
72
88
|
self.name: str = config.name
|
|
73
|
-
self.
|
|
74
|
-
self.
|
|
75
|
-
|
|
89
|
+
self.catalog_name: Optional[str] = config.catalog_name
|
|
90
|
+
self.external_volume: Optional[str] = config.external_volume
|
|
91
|
+
|
|
92
|
+
def build_relation(self, config: RelationConfig) -> CatalogRelation:
|
|
93
|
+
"""
|
|
94
|
+
Builds relation configuration within the context of this catalog integration.
|
|
95
|
+
|
|
96
|
+
This method is a placeholder and must be implemented in subclasses to provide
|
|
97
|
+
custom logic for building a relation.
|
|
98
|
+
|
|
99
|
+
Args:
|
|
100
|
+
config: User-provided model configuration.
|
|
101
|
+
|
|
102
|
+
Returns:
|
|
103
|
+
A `CatalogRelation` object constructed based on the input configuration.
|
|
104
|
+
|
|
105
|
+
Raises:
|
|
106
|
+
NotImplementedError: Raised when this method is not implemented in a subclass.
|
|
107
|
+
"""
|
|
108
|
+
raise NotImplementedError(
|
|
109
|
+
f"`{self.__class__.__name__}.build_relation` must be implemented to use this feature"
|
|
110
|
+
)
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import dataclasses
|
|
2
|
+
from typing import Any, Iterable, Union, Mapping, Optional
|
|
3
|
+
|
|
4
|
+
from dbt.adapters.record.cursor.fetchall import CursorFetchAllResult
|
|
5
|
+
from dbt_common.record import Record, Recorder
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
@dataclasses.dataclass
|
|
9
|
+
class CursorExecuteParams:
|
|
10
|
+
connection_name: str
|
|
11
|
+
operation: str
|
|
12
|
+
parameters: Optional[Union[Iterable[Any], Mapping[str, Any]]] = None
|
|
13
|
+
|
|
14
|
+
def _to_dict(self):
|
|
15
|
+
p = self.parameters
|
|
16
|
+
if isinstance(self.parameters, dict):
|
|
17
|
+
p = {(k, CursorFetchAllResult._process_value(v)) for k, v in self.parameters.items()}
|
|
18
|
+
elif isinstance(self.parameters, list) or isinstance(self.parameters, tuple):
|
|
19
|
+
p = [CursorFetchAllResult._process_value(v) for v in self.parameters]
|
|
20
|
+
|
|
21
|
+
return {
|
|
22
|
+
"connection_name": self.connection_name,
|
|
23
|
+
"operation": self.operation,
|
|
24
|
+
"parameters": p,
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
def _from_dict(cls, data):
|
|
28
|
+
# NOTE: This will be needed for replay, but is not needed at time
|
|
29
|
+
# of writing.
|
|
30
|
+
raise NotImplementedError()
|
|
31
|
+
|
|
32
|
+
|
|
33
|
+
@Recorder.register_record_type
|
|
34
|
+
class CursorExecuteRecord(Record):
|
|
35
|
+
"""Implements record/replay support for the cursor.execute() method."""
|
|
36
|
+
|
|
37
|
+
params_cls = CursorExecuteParams
|
|
38
|
+
result_cls = None
|
|
39
|
+
group = "Database"
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import dataclasses
|
|
2
2
|
import datetime
|
|
3
|
+
import decimal
|
|
3
4
|
from typing import Any, Dict, List, Mapping
|
|
4
5
|
|
|
5
6
|
from dbt_common.record import Record, Recorder
|
|
@@ -37,6 +38,8 @@ class CursorFetchAllResult:
|
|
|
37
38
|
return {"type": "date", "value": value.isoformat()}
|
|
38
39
|
elif type(value) is datetime.datetime:
|
|
39
40
|
return {"type": "datetime", "value": value.isoformat()}
|
|
41
|
+
elif type(value) is decimal.Decimal:
|
|
42
|
+
return float(value)
|
|
40
43
|
else:
|
|
41
44
|
return value
|
|
42
45
|
|
|
@@ -37,11 +37,14 @@
|
|
|
37
37
|
|
|
38
38
|
{% if existing_relation is none %}
|
|
39
39
|
{% set build_sql = get_create_table_as_sql(False, target_relation, sql) %}
|
|
40
|
+
{% set relation_for_indexes = target_relation %}
|
|
40
41
|
{% elif full_refresh_mode %}
|
|
41
42
|
{% set build_sql = get_create_table_as_sql(False, intermediate_relation, sql) %}
|
|
43
|
+
{% set relation_for_indexes = intermediate_relation %}
|
|
42
44
|
{% set need_swap = true %}
|
|
43
45
|
{% else %}
|
|
44
46
|
{% do run_query(get_create_table_as_sql(True, temp_relation, sql)) %}
|
|
47
|
+
{% set relation_for_indexes = temp_relation %}
|
|
45
48
|
{% set contract_config = config.get('contract') %}
|
|
46
49
|
{% if not contract_config or not contract_config.enforced %}
|
|
47
50
|
{% do adapter.expand_target_column_types(
|
|
@@ -65,6 +68,10 @@
|
|
|
65
68
|
{{ build_sql }}
|
|
66
69
|
{% endcall %}
|
|
67
70
|
|
|
71
|
+
{% if existing_relation is none or existing_relation.is_view or should_full_refresh() %}
|
|
72
|
+
{% do create_indexes(relation_for_indexes) %}
|
|
73
|
+
{% endif %}
|
|
74
|
+
|
|
68
75
|
{% if need_swap %}
|
|
69
76
|
{% do adapter.rename_relation(target_relation, backup_relation) %}
|
|
70
77
|
{% do adapter.rename_relation(intermediate_relation, target_relation) %}
|
|
@@ -76,10 +83,6 @@
|
|
|
76
83
|
|
|
77
84
|
{% do persist_docs(target_relation, model) %}
|
|
78
85
|
|
|
79
|
-
{% if existing_relation is none or existing_relation.is_view or should_full_refresh() %}
|
|
80
|
-
{% do create_indexes(target_relation) %}
|
|
81
|
-
{% endif %}
|
|
82
|
-
|
|
83
86
|
{{ run_hooks(post_hooks, inside_transaction=True) }}
|
|
84
87
|
|
|
85
88
|
-- `COMMIT` happens here
|
|
@@ -67,10 +67,10 @@
|
|
|
67
67
|
|
|
68
68
|
{%- set unique_key_str = unique_key|join(', ') -%}
|
|
69
69
|
|
|
70
|
-
delete from {{ target }}
|
|
70
|
+
delete from {{ target }} as DBT_INTERNAL_DEST
|
|
71
71
|
where ({{ unique_key_str }}) in (
|
|
72
72
|
select distinct {{ unique_key_str }}
|
|
73
|
-
from {{ source }}
|
|
73
|
+
from {{ source }} as DBT_INTERNAL_SOURCE
|
|
74
74
|
)
|
|
75
75
|
{%- if incremental_predicates %}
|
|
76
76
|
{% for predicate in incremental_predicates %}
|
|
@@ -31,6 +31,8 @@
|
|
|
31
31
|
{{ get_create_table_as_sql(False, intermediate_relation, sql) }}
|
|
32
32
|
{%- endcall %}
|
|
33
33
|
|
|
34
|
+
{% do create_indexes(intermediate_relation) %}
|
|
35
|
+
|
|
34
36
|
-- cleanup
|
|
35
37
|
{% if existing_relation is not none %}
|
|
36
38
|
/* Do the equivalent of rename_if_exists. 'existing_relation' could have been dropped
|
|
@@ -43,8 +45,6 @@
|
|
|
43
45
|
|
|
44
46
|
{{ adapter.rename_relation(intermediate_relation, target_relation) }}
|
|
45
47
|
|
|
46
|
-
{% do create_indexes(target_relation) %}
|
|
47
|
-
|
|
48
48
|
{{ run_hooks(post_hooks, inside_transaction=True) }}
|
|
49
49
|
|
|
50
50
|
{% set should_revoke = should_revoke(existing_relation, full_refresh_mode=True) %}
|
|
@@ -11,7 +11,18 @@
|
|
|
11
11
|
{%- set ref_dict = {} -%}
|
|
12
12
|
{%- for _ref in model.refs -%}
|
|
13
13
|
{% set _ref_args = [_ref.get('package'), _ref['name']] if _ref.get('package') else [_ref['name'],] %}
|
|
14
|
-
{%- set resolved = ref(*_ref_args, v=_ref.get('version'))
|
|
14
|
+
{%- set resolved = ref(*_ref_args, v=_ref.get('version')) -%}
|
|
15
|
+
|
|
16
|
+
{#
|
|
17
|
+
We want to get the string of the returned relation by calling .render() in order to skip sample/empty
|
|
18
|
+
mode rendering logic. However, people override the default ref macro, and often return a string instead
|
|
19
|
+
of a relation (like the ref macro does by default). Thus, to make sure we dont blow things up, we have
|
|
20
|
+
to ensure the resolved relation has a .render() method.
|
|
21
|
+
#}
|
|
22
|
+
{%- if resolved.render is defined and resolved.render is callable -%}
|
|
23
|
+
{%- set resolved = resolved.render() -%}
|
|
24
|
+
{%- endif -%}
|
|
25
|
+
|
|
15
26
|
{%- if _ref.get('version') -%}
|
|
16
27
|
{% do _ref_args.extend(["v" ~ _ref['version']]) %}
|
|
17
28
|
{%- endif -%}
|
|
@@ -22,7 +22,7 @@ class BaseAdapterStub(BaseAdapter):
|
|
|
22
22
|
"""
|
|
23
23
|
|
|
24
24
|
ConnectionManager = ConnectionManagerStub
|
|
25
|
-
CATALOG_INTEGRATIONS =
|
|
25
|
+
CATALOG_INTEGRATIONS = [CatalogIntegrationStub]
|
|
26
26
|
|
|
27
27
|
###
|
|
28
28
|
# Abstract methods for database-specific values, attributes, and types
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
from dataclasses import dataclass
|
|
2
|
+
from types import SimpleNamespace
|
|
2
3
|
from typing import Any, Dict, Optional
|
|
3
4
|
|
|
4
5
|
import pytest
|
|
@@ -7,38 +8,72 @@ from dbt.adapters.catalogs import (
|
|
|
7
8
|
CatalogIntegration,
|
|
8
9
|
CatalogIntegrationClient,
|
|
9
10
|
CatalogIntegrationConfig,
|
|
11
|
+
CatalogRelation,
|
|
10
12
|
DbtCatalogIntegrationAlreadyExistsError,
|
|
11
13
|
DbtCatalogIntegrationNotFoundError,
|
|
12
14
|
DbtCatalogIntegrationNotSupportedError,
|
|
13
15
|
)
|
|
16
|
+
from dbt.adapters.contracts.relation import RelationConfig
|
|
14
17
|
|
|
15
18
|
|
|
16
19
|
@dataclass
|
|
17
|
-
class FakeCatalogIntegrationConfig
|
|
20
|
+
class FakeCatalogIntegrationConfig:
|
|
18
21
|
name: str
|
|
19
22
|
catalog_type: str
|
|
23
|
+
catalog_name: Optional[str] = None
|
|
20
24
|
table_format: Optional[str] = None
|
|
21
25
|
external_volume: Optional[str] = None
|
|
22
26
|
adapter_properties: Optional[Dict[str, Any]] = None
|
|
23
27
|
|
|
24
28
|
|
|
29
|
+
@dataclass
|
|
30
|
+
class FakeRelationConfig:
|
|
31
|
+
resource_type = ""
|
|
32
|
+
name = ""
|
|
33
|
+
description = ""
|
|
34
|
+
database = ""
|
|
35
|
+
schema = ""
|
|
36
|
+
identifier = ""
|
|
37
|
+
compiled_code = None
|
|
38
|
+
meta = {}
|
|
39
|
+
tags = []
|
|
40
|
+
quoting_dict = {}
|
|
41
|
+
config = None
|
|
42
|
+
catalog_name = None
|
|
43
|
+
external_volume: str = "fake_relation_volume"
|
|
44
|
+
|
|
45
|
+
|
|
46
|
+
class FakeCatalogIntegration(CatalogIntegration):
|
|
47
|
+
catalog_type: str = "fake"
|
|
48
|
+
allows_writes: bool = False
|
|
49
|
+
table_format: str = "fake_format"
|
|
50
|
+
|
|
51
|
+
def build_relation(self, config: RelationConfig) -> CatalogRelation:
|
|
52
|
+
return SimpleNamespace(
|
|
53
|
+
catalog_name=self.catalog_name,
|
|
54
|
+
table_format=self.table_format,
|
|
55
|
+
external_volume=config.external_volume or self.external_volume,
|
|
56
|
+
)
|
|
57
|
+
|
|
58
|
+
|
|
25
59
|
@pytest.fixture(scope="function")
|
|
26
60
|
def fake_client() -> CatalogIntegrationClient:
|
|
27
|
-
return CatalogIntegrationClient(
|
|
61
|
+
return CatalogIntegrationClient([FakeCatalogIntegration])
|
|
28
62
|
|
|
29
63
|
|
|
30
64
|
@pytest.fixture
|
|
31
65
|
def fake_catalog() -> CatalogIntegrationConfig:
|
|
32
66
|
return FakeCatalogIntegrationConfig(
|
|
33
|
-
name="
|
|
67
|
+
name="fake_integration",
|
|
34
68
|
catalog_type="fake",
|
|
69
|
+
external_volume="fake_volume",
|
|
35
70
|
)
|
|
36
71
|
|
|
37
72
|
|
|
38
73
|
@pytest.fixture
|
|
39
74
|
def fake_unsupported_catalog() -> CatalogIntegrationConfig:
|
|
40
75
|
return FakeCatalogIntegrationConfig(
|
|
41
|
-
name="
|
|
76
|
+
name="fake_integration",
|
|
42
77
|
catalog_type="banana",
|
|
43
78
|
)
|
|
44
79
|
|
|
@@ -83,3 +118,13 @@ def test_adding_unsupported_catalog_integration(
|
|
|
83
118
|
assert e.value.catalog_type == fake_unsupported_catalog.catalog_type
|
|
84
119
|
assert fake_unsupported_catalog.catalog_type in str(e.value)
|
|
85
120
|
assert fake_catalog.catalog_type in str(e.value)
|
|
121
|
+
|
|
122
|
+
|
|
123
|
+
def test_build_relation(fake_client, fake_catalog):
|
|
124
|
+
fake_client.add(fake_catalog)
|
|
125
|
+
catalog = fake_client.get("fake_integration")
|
|
126
|
+
relation_config = FakeRelationConfig()
|
|
127
|
+
relation = catalog.build_relation(relation_config)
|
|
128
|
+
assert relation.catalog_name == catalog.catalog_name
|
|
129
|
+
assert relation.table_format == catalog.table_format
|
|
130
|
+
assert relation.external_volume == relation_config.external_volume
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
version = "1.14.3"
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
import dataclasses
|
|
2
|
-
from typing import Any, Iterable, Union, Mapping
|
|
3
|
-
|
|
4
|
-
from dbt_common.record import Record, Recorder
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
@dataclasses.dataclass
|
|
8
|
-
class CursorExecuteParams:
|
|
9
|
-
connection_name: str
|
|
10
|
-
operation: str
|
|
11
|
-
parameters: Union[Iterable[Any], Mapping[str, Any]]
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
@Recorder.register_record_type
|
|
15
|
-
class CursorExecuteRecord(Record):
|
|
16
|
-
"""Implements record/replay support for the cursor.execute() method."""
|
|
17
|
-
|
|
18
|
-
params_cls = CursorExecuteParams
|
|
19
|
-
result_cls = None
|
|
20
|
-
group = "Database"
|
|
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
|
|
File without changes
|
|
File without changes
|
|
File without changes
|