google-bigquery

Updating BigQuery table properties from Python makes table disappear

孤街醉人 提交于 2020-11-29 09:49:13
问题 Subject pretty much says it all. When I run the code from the BigQuery docs to change the table property (in this case, its expiration date), it seems to just summarily delete the table instead. (Can't be found in the BQ GUI either.) Anyone know why? Thanks. # Replace "dk" with your own initials before running this s_table_id = 'hcwisdom.temp_tables.new_test_table' from google.cloud import bigquery client = bigquery.Client() schema = [ bigquery.SchemaField("full_name", "STRING", mode=

Updating BigQuery table properties from Python makes table disappear

给你一囗甜甜゛ 提交于 2020-11-29 09:48:05
问题 Subject pretty much says it all. When I run the code from the BigQuery docs to change the table property (in this case, its expiration date), it seems to just summarily delete the table instead. (Can't be found in the BQ GUI either.) Anyone know why? Thanks. # Replace "dk" with your own initials before running this s_table_id = 'hcwisdom.temp_tables.new_test_table' from google.cloud import bigquery client = bigquery.Client() schema = [ bigquery.SchemaField("full_name", "STRING", mode=

Invalid date error in custom query in Data Studio

霸气de小男生 提交于 2020-11-29 09:07:09
问题 I am trying to prepare a chart using custom query (BigQuery) in Data Studio.However I get invalid date error when using Data Studio Date Parameter @DS_START_DATE and @DS_END_DATE . Here is my query SELECT cat_tbl.*,tag.Category_name FROM (SELECT (SELECT category FROM UNNEST(ana_cat) ORDER BY score DESC LIMIT 1) AS category, * FROM `projectId.dataset.table1`) AS cat_tbl RIGHT JOIN `projectId.dataset.table2` AS tag ON cat_tbl.category=tag.Category_id WHERE DATE(cat_tbl.date) BETWEEN @DS_START

Invalid date error in custom query in Data Studio

僤鯓⒐⒋嵵緔 提交于 2020-11-29 09:04:20
问题 I am trying to prepare a chart using custom query (BigQuery) in Data Studio.However I get invalid date error when using Data Studio Date Parameter @DS_START_DATE and @DS_END_DATE . Here is my query SELECT cat_tbl.*,tag.Category_name FROM (SELECT (SELECT category FROM UNNEST(ana_cat) ORDER BY score DESC LIMIT 1) AS category, * FROM `projectId.dataset.table1`) AS cat_tbl RIGHT JOIN `projectId.dataset.table2` AS tag ON cat_tbl.category=tag.Category_id WHERE DATE(cat_tbl.date) BETWEEN @DS_START

Invalid date error in custom query in Data Studio

邮差的信 提交于 2020-11-29 09:01:59
问题 I am trying to prepare a chart using custom query (BigQuery) in Data Studio.However I get invalid date error when using Data Studio Date Parameter @DS_START_DATE and @DS_END_DATE . Here is my query SELECT cat_tbl.*,tag.Category_name FROM (SELECT (SELECT category FROM UNNEST(ana_cat) ORDER BY score DESC LIMIT 1) AS category, * FROM `projectId.dataset.table1`) AS cat_tbl RIGHT JOIN `projectId.dataset.table2` AS tag ON cat_tbl.category=tag.Category_id WHERE DATE(cat_tbl.date) BETWEEN @DS_START