Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Unit Testing] Implement unit_testing_column_schema_strategy macro and use it unit materialization #113

Closed
6 tasks
Tracked by #8283
MichelleArk opened this issue Feb 28, 2024 · 2 comments

Comments

@MichelleArk
Copy link
Contributor

Housekeeping

  • I am a maintainer of 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

Preview Give feedback

Suggested tests

Tasks

Preview Give feedback

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.

Copy link

This issue has been marked as Stale because it has been open for 180 days with no activity. If you would like the issue to remain open, please comment on the issue or else it will be closed in 7 days.

@github-actions github-actions bot added the Stale label Aug 27, 2024
Copy link

github-actions bot commented Sep 3, 2024

Although we are closing this issue as stale, it's not gone forever. Issues can be reopened if there is renewed community interest. Just add a comment to notify the maintainers.

@github-actions github-actions bot closed this as not planned Won't fix, can't repro, duplicate, stale Sep 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant