How Bigquery provides a table that integrates Google Drive (spreadsheet) and CSV data

Asked 2 years ago, Updated 2 years ago, 99 views

Is there a way to create a single table that integrates data from external sources such as Google Drive and normal data such as CSV upload in Bigquery?

For more information, see
We are trying to accumulate and analyze several years' worth of customer data in BigqueryWe are planning to use Google Datastudio as a visualization tool for Bigquery data.

In order for Datastudio to load customer data for the past few years, Bigquery should have customer data as a single table, but it is currently being stored as multiple Excel files, and the data is being updated daily.I would like to analyze this data weekly, and I thought that the following methods might be used to achieve this.

However, the data associated with Google Drive in this part of ★3 does not work to query multiple tables.

For example, the two tables are as follows:

SELECT
  *
from
 `hogehoge.hogehoge.input*`

specifies

Error: External tables cannot be queried through prefix.

There is an error like this is displayed:Do you mean that wildcards do not work in tables with external sources such as Google Drive?Switching external source data to a view also results in an error.

Error: Views cannot be queried through prefix. 

Is there any way to solve this problem without making an error?In any case, there is no problem as long as you can create a single table with past data while incorporating daily updated Google Drive data into Bigquery.

google-bigquery

2022-09-29 21:50

1 Answers

Legacy SQL TABLE_DATE_RANGE was able to query fed table as well.
I think StandardSQL will be available in a while, but if you want to run it right now, it seems faster to write it in Legacy SQL.

SELECT
  *
from
  TABLE_DATE_RANGE (federated.t, TIMESTAMP ('2017-01-01'), TIMESTAMP ('2017-01-02')
LIMIT
  1000


2022-09-29 21:50

If you have any answers or tips


© 2024 OneMinuteCode. All rights reserved.