Replies: 1 comment
-
Example implementations of
The crucial piece is implementing |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
This discussion is for communicating to adapter maintainers the scope of work needed to make use of the changes in 1.3.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.2.0
, please see #5468.The latest release cut for 1.3.0,
dbt-core==1.3.0rc2
was published on October 3, 2022 (PyPI | Github). We are targeting releasing the official cut of 1.3.0 in time for the week of October 16 (in time for Coalesce conference).This minor release contains no breaking changes to interfaces but does change the default behavior in ways that may impact your adapter. In addition there are new features for end-users and some developer quality-of-life improvements that will benefit adapter maintainers. This means that end users can install run dbt-core==1.2.0 alongside an adapter of a previous minor version (e.g. 1.1.0 or 1.0.0). However, they won't necessarily have access to the new features and most importantly: the SQL being generated is not guaranteed to be consistent.
Support for python models
The
statement()
andcreate_table_as()
macros accept a new argument,language
, with a default value ofsql
.You might not even need to add this argument if your adapter doesn't currently support Python. Beyond this potential change, there should be no other breaking changes to your adapter.
If you'd like to bring Python support to dbt, reach out! we don't have great docs on this yet, but if you're interested, we're happy to help you get started and support where we are able!
Incremental mats: more standard and more error-proof
user-facing changes
delete+insert
. it is nowappend
. See point below to override this.adapter_get_incremental_default_sql()
, in which adapter maintainers can specify a 'default' strategy for incremental models.valid_incremental_strategies()
in which adapter maintainers can define all supported strategies. Previously, if i user defined an unsupported incremental strategy, they would not learn of their error until compile time or later. Now dbt will throw an error before attempting to compile.non-user facing changes
2. refactor your materialization to match that of the default
New functional adapter tests:
The directory of tests just for folks like us,
tests/functional/adapter/
has some new goodies for us!test_basic.py
BaseIncrementalNotSchemaChange
test_data_types.py
BaseTypeBoolean
test_grants.py
BaseInvalidGrants
test_utils.py
) for the macros recently migrated from dbt-utilsBaseCurrentTimestampNaive
BaseArrayAppend
BaseArrayConcat
BaseArrayConstruct
test_concurrency.py
BaseConcurrency
(example: dbt-snowflake#252)tests/functional/adapter/test_ephemeral.py
BaseEphemeralMulti
(example: dbt-snowflake#244)Beta Was this translation helpful? Give feedback.
All reactions