Empty schema of filtered_information_schema_columns
when initializing
#544
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Overview
We use elementary and dbt with BigQuery projects. The BigQuery tables modeled by dbt are created in multiple Google Cloud project. And we have GCP projects specialized to persist results of elementary.
When we tried to upgrade elementary and dbt-data-reliability from 0.8.0 to 0.10.3 with a
dbt run --select elementary --profile elementary
, we got the subsequent error. According to my research, theelementary_v0.filtered_information_schema_columns
model tries to access metadata of all tables in the dbt project. In my opinion, when creating and upgrading the schemas of elementary, it would be ok to create empty ones.What is the change?
I would like to create empty schemas of elementary, when creating and upgrading the dbt schemas of elementary. To do so, there might be a couple of solutions. First, we use an environment variable to call the
get_empty_columns_from_information_schema_table
macro to get empty schemas offiltered_information_schema_columns
. Second, as the pull request, we take advantage of the information of the--select
option.context["invocation_args_dict"]["select"]
enables us to get a list of values passed by the option.