Home > Blockchain >  How to create external table using dbt from Google Sheet to BigQuery?
How to create external table using dbt from Google Sheet to BigQuery?

Time:07-27

I want to create external table in BigQuery and the data source is from Google Sheet. Is it possible to do it using dbt? In the yml file, where should I put the URI? The main problem is, I don’t have the access to create it directly in BigQuery.

CodePudding user response:

One way to handle a Google Sheet as a source is by creating a new table out of it in BigQuery via Connected Sheets. Then, you create a new source in dbt that relies on that table, and start building your downstream models from there.

As far as I know, you cannot create a source directly from dbt, unless it is a seed file, which I woul not recommend unless it is a rather static file (e.g. country names and ISO codes, which is not prone to change over time).

CodePudding user response:

We have a similar situation where the data source is from Google Sheet.

The end user updates the Google sheet on a periodical basic and we replicate it using Fivetran to our Snowflake datastore.

DBT can then pick up the data seamlessly.

  • Related