0
votes

I have a BigQuery database, i want to create dynamic tables.

Ex: table_20170609 - if date is 9th june 2017
table_20170610 - if date is 10th june 2017

Daily i will get some excel data and i have to upload to the above dynamically created table. Data in excel is not day wise, it will be from start date to today's date.

I know connecting bigquery to tableau and running queries. Is there any automated method where tableau will read dynamic table from bigquery and generate the report.

current working - i have created one table(reports) and everyday i will rename the table reports to reports_bkp_date and will create new table reports.

I'm new to bigquery and tableau, i would like to know -
How to create dynamic tables in bigquery?
How to connect dynamic table to tableau (daily i should not change table name manually)?

1
I don't quite get what you're trying to achieve, but sounds like partitioned tables might help here: cloud.google.com/bigquery/docs/partitioned-tables. Instead of creating one table per day you create a partition per day.Hua Zhang

1 Answers

1
votes

You have two immediate options - firstly, create a view in BigQuery (instead of a table) which will collate together all relevant tables, then connect to this in Tableau.

The better approach, given that you are having to manually upload a new table every day, is to use a wildcard table connection in Tableau and use a similar naming convention for your data tables, for example you might use DailyData_2017_* to capture all tables in he following format:

DailyData_2017_06_01

DailyData_2017_06_02

DailyData_2017_06_03

Finally, note that you can append to a table in BigQuery, rather than replacing it's contents. If your data is time stamped then this might work for you too.

Ben