Skip to content
This repository was archived by the owner on May 17, 2024. It is now read-only.

Get prod alias from --state manifest file when provided #646

Closed
sebaap opened this issue Jul 18, 2023 · 2 comments · Fixed by #652
Closed

Get prod alias from --state manifest file when provided #646

sebaap opened this issue Jul 18, 2023 · 2 comments · Fixed by #652
Assignees
Labels
--dbt Issues/features related to the dbt integration enhancement New feature or request stale_immune Immunity to stale bot

Comments

@sebaap
Copy link
Contributor

sebaap commented Jul 18, 2023

Is your feature request related to a problem? Please describe.
We have an uncommon BigQuery setup where our prod environment consist of multiple GCP projects, but dev is a single project. In this setup the name of the underneath tables for each model is different between the two environments, so currently data-diff doesn't work for us because it tries to use the same model alias in both environments.

Describe the solution you'd like
When providing a prod manifest via the --state, take the alias for prod from the manifest instead of using the same one from the run_results file. This should be fairly easy to implement and would allow us to use data-diff :)

Describe alternatives you've considered
With my very limited familiarity with the code, I don't see any other alternative to be honest.
Migrating to a single project setup is not an option for us as it would require a huge effort.

Additional context
I'm happy to submit a PR if help is needed, as I have a working version of this already.

@sebaap sebaap added the enhancement New feature or request label Jul 18, 2023
@dlawin
Copy link
Contributor

dlawin commented Jul 19, 2023

I think this was overlooked, no reason not to use the prod alias when we have the manifest here

prod_database, prod_schema = _get_prod_path_from_manifest(model, dbt_parser.prod_manifest_obj)

@dlawin dlawin added --dbt Issues/features related to the dbt integration stale_immune Immunity to stale bot and removed triage labels Jul 19, 2023
@dlawin
Copy link
Contributor

dlawin commented Jul 19, 2023

I'm happy to submit a PR if help is needed, as I have a working version of this already.

Please do and don't worry about the tests if some break, happy to take it the last mile

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
--dbt Issues/features related to the dbt integration enhancement New feature or request stale_immune Immunity to stale bot
Projects
None yet
2 participants