google-bigquery

Query Failed Error: Views cannot be queried through prefix. Partial list of the matched views are

痴心易碎 提交于 2020-02-04 05:47:06
问题 I am trying to query a dataset with multiple tables and equivalent views. I am trying to query just the tables using _table_suffix, but it returns an error "Query Failed Error: Views cannot be queried through prefix. Partial list of the matched views-......" I cannot remove the views from the dataset. Is there a way to query the tables only and ignore the views? SELECT COUNT(*), _table_suffix, DATE(created) FROM `dataset.viewed_*` WHERE _table_suffix like '%_page' 回答1: Your options are:

Stream BigQuery table into Google Pub/Sub

独自空忆成欢 提交于 2020-02-03 07:23:43
问题 I have a Google bigQuery Table and I want to stream the entire table into pub-sub Topic what should be the easy/fast way to do it? Thank you in advance, 回答1: That really depends on the size of the table. If it's a small table (a few thousand records, a couple doze columns) then you could setup a process to query the entire table, convert the response into a JSON array, and push to pub-sub. If it's a big table (millions/billions of records, hundreds of columns) you'd have to export to file,

Oops! used a reserved word to name a column

心已入冬 提交于 2020-02-03 03:18:44
问题 I made a bigquery table with one column named "row" (no quotes)... doh! Now my sql won't compile if I reference that column: SELECT row, etext FROM [hcd.hdctext] LIMIT 1; =ERROR" I did not see "ROW" as a reserved word in GQL... I saw that in some systems you can get around that problem with backticks : SELECT `row`, etext FROM [hcd.hdctext] LIMIT 1; (Using reserved words in column names) Any way to do the same in bigquery? Otherwise I will have to reupload my 200M of data and start again.

Build array based on add and remove event rows in BigQuery

僤鯓⒐⒋嵵緔 提交于 2020-02-02 15:26:06
问题 I have a table in BigQuery with the following structure: datetime | event | value ========================== 1 | add | 1 ---------+--------+------- 2 | remove | 1 ---------+--------+------- 6 | add | 2 ---------+--------+------- 8 | add | 3 ---------+--------+------- 11 | add | 4 ---------+--------+------- 23 | remove | 3 ---------+--------+------- I'm trying to build a view which adds a list column to each row containing the current state of the array. The array will never contain duplicate

How to set existing table expiration via Python Client Library for Google BigQuery?

╄→尐↘猪︶ㄣ 提交于 2020-02-02 14:48:35
问题 Using the official Python Client for Google BigQuery there doesn't appear to be a way to set the table expires (or other properties) on an existing table; you can only create a table with the properties you want and then load data "on top" of it. The API itself has a tables/patch command which does allow setting the expirationTime propery. However, I don't see any use of this in the client library code. The following code in client.py is used for create_table and I think that simply changing

How to aggregate multiple rows into one in BigQuery?

折月煮酒 提交于 2020-02-02 06:27:25
问题 Suppose you have a de-normalized schema with multiple rows like below: uuid | property | value ------------------------------------------ abc | first_name | John abc | last_name | Connor abc | age | 26 ... The same set of properties for all rows, not necessarily sorted. How to create a table such as using BigQuery (i.e. no client): Table user_properties: uuid | first_name | last_name | age -------------------------------------------------------- abc | John | Connor | 26 In traditional SQL

How to aggregate multiple rows into one in BigQuery?

笑着哭i 提交于 2020-02-02 06:25:53
问题 Suppose you have a de-normalized schema with multiple rows like below: uuid | property | value ------------------------------------------ abc | first_name | John abc | last_name | Connor abc | age | 26 ... The same set of properties for all rows, not necessarily sorted. How to create a table such as using BigQuery (i.e. no client): Table user_properties: uuid | first_name | last_name | age -------------------------------------------------------- abc | John | Connor | 26 In traditional SQL

Transpose nested rows into columns in bigquery with google analytics data

自作多情 提交于 2020-02-01 06:23:20
问题 I am interested in pulling visitors with custom dimension attributes, where each row is a unique fullvisitorid and columns are desired customdimension.values. Using the london helmets as an example, here I am pulling visitors with the two custom dimensions I am interested in: SELECT fullvisitorid, customDimensions.index, customDimensions.value FROM [google.com:analytics-bigquery:LondonCycleHelmet.ga_sessions_20130910] where customDimensions.index in (2,3) group by fullvisitorid,

Can bigquery or Firebase analytics data acessible from ios app side programmatically?

半世苍凉 提交于 2020-01-30 11:25:26
问题 I have Firebase analytics data and enabled BigQuery. But I have a requirement to validate the number of events and screens at app side under automated UI testing. Anyway to access and validate the Firebase analytics data at ios app side programmatically either in swift or objective c? 回答1: There is no API to retrieve Google Analytics data through Firebase. See Can I get firebase analytics data using query? There is also no API for BigQuery to allow secure access directly from your client-side

Can bigquery or Firebase analytics data acessible from ios app side programmatically?

戏子无情 提交于 2020-01-30 11:25:08
问题 I have Firebase analytics data and enabled BigQuery. But I have a requirement to validate the number of events and screens at app side under automated UI testing. Anyway to access and validate the Firebase analytics data at ios app side programmatically either in swift or objective c? 回答1: There is no API to retrieve Google Analytics data through Firebase. See Can I get firebase analytics data using query? There is also no API for BigQuery to allow secure access directly from your client-side