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] Extend TestPostgresUnitTestingTypes to include complex types #29

Open
3 tasks done
Tracked by #8283
MichelleArk opened this issue Feb 28, 2024 · 3 comments
Open
3 tasks done
Tracked by #8283
Labels
enhancement New feature or request unit tests Issues related to built-in dbt unit testing functionality

Comments

@MichelleArk
Copy link
Contributor

MichelleArk commented Feb 28, 2024

Is this your first time submitting a feature request?

  • I have read the expectations for open source contributors
  • I have searched the existing issues, and I could not find an existing issue for this feature
  • I am requesting a straightforward extension of existing dbt-spark functionality, rather than a Big Idea better suited to a discussion

Describe the feature

Per dbt-labs/dbt-core#8423 (comment), add postgres-specific input fixtures extend TestPostgresUnitTestingTypes to test complex types (at least JSON & ARRAY).

Describe alternatives you've considered

n/a

Who will this benefit?

dbt users of dbt-postgres using unit testing

Are you interested in contributing this feature?

Anything else?

Depends on dbt-labs/dbt-adapters#113.

See dbt-bigquery for a similar example.

@bdewilde
Copy link

bdewilde commented Jul 1, 2024

Hi @MichelleArk , this missing functionality has been a critical blocker in my ability to leverage the new unit testing framework for my models, most of which have one or two array-type columns. Do you have any idea how to go about implementing this, or know who might? I'd love to at least try, so I can unblock myself.

@MichelleArk
Copy link
Contributor Author

Hey @bdewilde! There's a proposal written up with some issues as part of the spiking done here:dbt-labs/dbt-core#8423 (comment), have you had a chance to read through it?

It'll be a medium-sized lift because it'll require changes in the base unit materialization (in the dbt-adapters repo) to introduce a new strategy pattern that defaults to the current strategy (using relation-based column schemas), but also implements an alternative strategy (using adapter. get_column_schema_from_query). the new strategy would then need to be selected + tested for in dbt-postgres.

@bdewilde
Copy link

bdewilde commented Jul 8, 2024

Hey @MichelleArk , thanks very much for the link / writing all that up. This may be... more intensive than I'm comfortable taking on, since I'm not particularly familiar with dbt's internals. 😮‍💨 So for now, I'll just submit a strong +1 for building out this capability, then let qualified folks prioritize it as able and interested.

@dbeatty10 dbeatty10 added enhancement New feature or request unit tests Issues related to built-in dbt unit testing functionality labels Sep 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request unit tests Issues related to built-in dbt unit testing functionality
Projects
None yet
Development

No branches or pull requests

3 participants