Replies: 9 comments 13 replies
-
Example diffs are empty |
Beta Was this translation helpful? Give feedback.
-
Hi @dataders, what about Materialized View, Materialized Tests in 1.5.0? Would |
Beta Was this translation helpful? Give feedback.
-
Beta Was this translation helpful? Give feedback.
-
Thank you @dataders I have started to work on v.1.5.0 for dbt-oracle and have a couple of questions.
create table dbt_test.my_model
(id int)
as
select 1 as id from dual raises
Following works correctly create table dbt_test.my_model
(id primary key not null)
as
select 1 as id from dual |
Beta Was this translation helpful? Give feedback.
-
Thank you @dataders. I would like to use dbt-core v1.5.0 with dbt-databricks adapter. Any ETA by when that will be available? |
Beta Was this translation helpful? Give feedback.
-
While working on the upgrade, I noticed that this snippet enforces that contracts can only be applied to Something else that is confusing is that the returned error uses constraints, rather than contracts:
IIUC, contracts are supported for |
Beta Was this translation helpful? Give feedback.
-
Hello, I am exploring dbt-databricks==1.5.1 (it uses dbt-core 1.5.0). I believe contracts work for materialized tables. Is there something I am missing
My model files are as follows
test_version_001.sql test_version_002.sql |
Beta Was this translation helpful? Give feedback.
-
@dataders Could you clarify the logging TBC? |
Beta Was this translation helpful? Give feedback.
-
@dataders I know we're a bit late to the party, but ClickHouse has case sensitive table and database (schema) names, so the current adapter |
Beta Was this translation helpful? Give feedback.
-
Overview
This discussion is for communicating to adapter maintainers the scope of work needed to make use of the changes in 1.5.0. If you have questions and concerns, please ask them here for posterity.
For the guide to upgrading an adapter to be compatible with dbt-core=1.4.0, please see #6624.
The latest release for 1.5.0,
dbt-core==1.5.0rc1
, (PyPI | Github).The following releases are forthcoming with the projected dates:
April 13, 2023: release cut (1.5.0rc1
)1.5.0
)Changes
Example diffs from dbt Labs-owned adapters
Below gives the changes as of the latest beta release (
1.5.0rc1
)dbt-labs/dbt-redshift@v1.4.0...1.5.latest
dbt-labs/dbt-bigquery@v1.4.0...1.5.latest
dbt-labs/dbt-snowflake@v1.4.0...1.5.latest
dbt-labs/dbt-spark@v1.4.0...1.5.latest
Behind the scenes improvements
Support for Py 3.11
Do this if you haven't already! Python 3.11 is the default latest version that is installed without specifying a verson. For example
brew install python
.Adapter zone tests
The work is finally finished converting our test suite. This means that, going forward, any adapter test that is useful for more than one adapter will be available to community and partner adapter maintainers. There are many new tests You can find them all in the
tests/adapter/dbt/tests/adapter/
directory of the dbt-core repo(link). Quick callout to some new categories of tests:
Logging restructuring
TBC (to-be-communicated)
Upgrade test suite version
Be sure to upgrade the version of
dbt-tests-adapter
New features
as an adapter maintainer, there's three options for new features in dbt Cloud:
Materialized View, Materialized Tests
Bumped to 1.6! Nothing to do for 1.5 :)
Model Contracts
How to support:
data_type_code_to_name
to convert Python connector return types to strings (example: dbt-snowflake PR)create_table_as
, add calls to two macros that assert column spec equivalence (get_assert_columns_equivalent
) and template out DDL containing column names, types, and constraints (get_table_columns_and_constraints
) (example: dbt-snowflake)create_view_as
, add a call to just the macro asserting column spec equivalence -get_assert_columns_equivalent
(example: dbt-snowflake)constraints
data structure (docs) by:Adapter
class calledCONSTRAINT_SUPPORT
(Snowflake example) that maps constraint types to their support/enforcement values,andAdapter
methodsrender_column_constraint
andrender_model_constraint
as necessary and to render out the appropriate text for each constraint type.NOT NULL
(docs), sodbt-trino
would implement this method and data structure with onlynot_null
constraints supported.How to stub elegantly:
In both
create_table_as
andcreate_view_as
macros, raise an explicit warning if a model is configured with an enforced contract. For example,What if you do nothing:
Users will see new documentation about model contracts and expect to be able to use it!
If your adapter uses the default materializations for table, view, and incremental, and the user configures a model to have an enforced contract, they will see an explicit error:
If, however, your adapter reimplements those materializations, their configuration may do nothing—which is worse! If you have reimplemented those materializations, and your adapter cannot implement support for contracts, we recommend you raise an explicit warning if they configure a model with an enforced contract.
Beta Was this translation helpful? Give feedback.
All reactions