[Unit Testing] Implement unit_testing_column_schema_strategy
macro and use it unit materialization
#113
Labels
unit_testing_column_schema_strategy
macro and use it unit materialization
#113
Housekeeping
dbt-adapters
Short description
In order to support unit testing complex types in adapters that can't rely on adapter.get_schema_from_relation for column types that are usable in safe_cast, provide an alternative column schema strategy (adapter.get_columns_in_relation) to what is currently in place by default: https://github.com/dbt-labs/dbt-adapters/blob/main/dbt/include/global_project/macros/materializations/tests/unit.sql#L11
This should be selectable based on the specific adapter as some strategies work very well for some adapters, but not for others, and vice versa. The ability to choose a strategy here is key for adapter maintainers!
Context
dbt-labs/dbt-core#8423 (comment)
Acceptance criteria
Tasks
Suggested tests
Tasks
Are there any security concerns with these changes?
nope
Consequences
This will enable adapter implementations to have more flexibility in the column schema strategy that the unit materialization works, allowing more seamless extension for complex types depending on what's best-suited for the adapter.
The text was updated successfully, but these errors were encountered: