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

schema_changes_from_baseline ignores tests_schema_name variable #1591

Closed
kokorin opened this issue Jul 5, 2024 · 3 comments · Fixed by elementary-data/dbt-data-reliability#734
Labels
Bug Something isn't working Triage 👀

Comments

@kokorin
Copy link
Contributor

kokorin commented Jul 5, 2024

Describe the bug
When elementary.tests_schema_name var is set schema_changes_from_baseline test result tables are created in main elementary schema, but other test results (e.g. schema_changes) are created in another schema defined by <main elementary schema> + <elementary.tests_schema_name>

Expected behavior
schema_changes_from_baseline test result tables are created in schema defined by elementary.tests_schema_name

Screenshots
If applicable, add screenshots to help explain your problem.

Environment (please complete the following information):

  • Elementary CLI (edr) version: [e.g. 0.5.3], can be found by running pip show elementary-data
  • Elementary dbt package version: [e.g. 0.4.1], can be found in packages.yml file
  • dbt version you're using [e.g. 1.8.1]
  • Data warehouse [e.g. snowflake]
  • Infrastructure details (e.g. operating system, prod / dev / staging, deployment infra, CI system, etc)

Additional context
test schema_changes_from_baseline sets tests_schema_name variable, but just doesn't use it anywhere

Would you be willing to contribute a fix for this issue?
May be

@kokorin kokorin added Bug Something isn't working Triage 👀 labels Jul 5, 2024
@kokorin
Copy link
Contributor Author

kokorin commented Jul 5, 2024

I wanted to create reproducible example with duckdb, but it's not supported by Elementary

@elongl
Copy link
Member

elongl commented Jul 8, 2024

Hi @kokorin, thanks a lot for bringing this to our attention!
I opened a small PR that solves this issue.
May I ask, do you use the tests_schema_name var to store the Elementary tests' results outside of the Elementary schema?

@kokorin
Copy link
Contributor Author

kokorin commented Jul 8, 2024

Thank you @elongl
I just experimented with that property. Sometimes our DBT runs are interrupted (by timeout) and test result tables are left intact in Elementary schema, so my idea was to use that variable to put test results tables into separate schema and schedule schema drop when DBT run completes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Something isn't working Triage 👀
Projects
None yet
2 participants