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

Using information schema #238

Closed

Conversation

hassan-mention-me
Copy link

@hassan-mention-me hassan-mention-me commented Jul 26, 2022

resolves #113 #113

Using information_schema instead of TABLES to fetch catalog data, which limits access level needed to generate DBT docs.

Checklist

  • I have signed the CLA
  • I have run this code in development and it appears to resolve the stated issue
  • This PR includes tests, or tests are not required/relevant for this PR
  • I have updated the CHANGELOG.md and added information about my change to the "dbt-bigquery next" section.

@cla-bot cla-bot bot added the cla:yes label Jul 26, 2022
@dansun117
Copy link

currently running into the same issue and found this PR, looks like there are conflicts in this branch.

@@ -473,8 +473,17 @@ def test_replace(self):
relation = BigQueryRelation.from_dict(kwargs)
info_schema = relation.information_schema()

tables_schema = info_schema.replace(information_schema_view='__TABLES__')
assert tables_schema.information_schema_view == '__TABLES__'
tables_schema = info_schema.replace(information_schema_view='INFORMATION_SCHEMA.TABLES')
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

TABLE_STORAGE is also needed for multi-region BigQuery setups as illustrated in this macro workaround this PR is solving for natively: https://github.com/GeneralMills/gmi_common_dbt_utils/blob/main/macros/bq_catalog.sql#L51

@sungchun12
Copy link
Contributor

@hassan-mention-me Any updates on this?

@ohiosonia
Copy link

This is something General Mills is also interested in seeing

@dbeatty10 dbeatty10 mentioned this pull request Oct 26, 2022
6 tasks
@colin-rogers-dbt
Copy link
Contributor

Closing this in favor of getting #364 over the line

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cla:yes ok to test ready_for_review Externally contributed PR has functional approval, ready for code review from Core engineering
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[CT-162] Upgrade from the __tables__ construct to the information_schema.tables construct
8 participants