google-bigquery

Error when querying avro-backed hive table: java.lang.IllegalArgumentException

杀马特。学长 韩版系。学妹 提交于 2020-01-06 02:52:11
问题 I am trying to create a hive table on azure HDInsight from an avro file exported from raw google analytics data in BigQuery. It seems to work. I can created the table, and there are no errors when I run DESCRIBE. But when I try to select results, even if I select only two non-nested columns, I get a an error: "java.lang.IllegalArgumentException". Here's how I created the table: DROP TABLE IF EXISTS ga_sessions_20150106; CREATE EXTERNAL TABLE IF NOT EXISTS ga_sessions_20150106 ROW FORMAT SERDE

writing legacy views in Standard SQL format in Bigquery

廉价感情. 提交于 2020-01-05 09:04:10
问题 I asked this question yesterday, I'm trying to write my legacy view in standard SQL. My table is FROM [myProject.Mydataset.ga_sessions_20171129] ga_sessions_20171129 is my table id and the last part of its name shows the last date that the table is updated, so the next table for the next day will be 20171130 We used this code to update the table every day FROM `project.dataset.ga_sessions_*` WHERE _TABLE_SUFFIX = FORMAT_DATE('%Y%m%d', CURRENT_DATE()) But it didn't work and gave me this error:

writing legacy views in Standard SQL format in Bigquery

萝らか妹 提交于 2020-01-05 09:02:39
问题 I asked this question yesterday, I'm trying to write my legacy view in standard SQL. My table is FROM [myProject.Mydataset.ga_sessions_20171129] ga_sessions_20171129 is my table id and the last part of its name shows the last date that the table is updated, so the next table for the next day will be 20171130 We used this code to update the table every day FROM `project.dataset.ga_sessions_*` WHERE _TABLE_SUFFIX = FORMAT_DATE('%Y%m%d', CURRENT_DATE()) But it didn't work and gave me this error:

BigQuery load CSV file 'successful' although the table does not update

别说谁变了你拦得住时间么 提交于 2020-01-05 08:58:53
问题 I am trying to upload a CSV to a preexisting table in Google BigQuery although the table is not updating. It says the job loads 'successfully' and I have no errors. Except when I go into check the table, it doesnt add in the lines of the newly 'added' CSV. I have the setting 'append to table' although it is not appending to table. Things that I have tried include: copying the table with a similar name to be able to have selected 'over write table'/''write if empty' even though i know this isn

BigQuery load CSV file 'successful' although the table does not update

别说谁变了你拦得住时间么 提交于 2020-01-05 08:57:22
问题 I am trying to upload a CSV to a preexisting table in Google BigQuery although the table is not updating. It says the job loads 'successfully' and I have no errors. Except when I go into check the table, it doesnt add in the lines of the newly 'added' CSV. I have the setting 'append to table' although it is not appending to table. Things that I have tried include: copying the table with a similar name to be able to have selected 'over write table'/''write if empty' even though i know this isn

BigQuery argmax: Is array order maintained when doing CROSS JOIN UNNEST

匆匆过客 提交于 2020-01-05 08:36:18
问题 Question: In BigQuery, standard SQL, if I run SELECT * FROM mytable CROSS JOIN UNNEST(mytable.array) Can I be certain that the resulting row order is the same as the array order? Example: Let's say I have the following table mytable : Row | id | prediction 1 | abcd | [0.2, 0.5, 0.3] If I run SELECT * FROM mytable CROSS JOIN UNNEST(mytable.prediction) , can I be certain that the row order is the same as the array order? I.e. will the resulting table always be: Row | id | unnested_prediction 1

Escaping delimiter in BQ

巧了我就是萌 提交于 2020-01-05 07:08:44
问题 I have a ton of files which are delimited by |, however, they have | as values in the fields as well. the | in the data has been escaped with \ but I don't think BQ is picking it up, is this something I can fix without having to open every single file, and updating? there are 2-3000 files and are all zipped, so doing it one by one is not at all practical. 回答1: Read each row as a whole line (CSV, with a weird character delimiter). Parse in BigQuery - either via REGEX or JavaScript UDF. I

Creating views periodically in BigQuery

风流意气都作罢 提交于 2020-01-05 06:31:05
问题 I'm currently using Firebase Analytics to export user-related data to BigQuery. Is there a way to create a view automatically in BigQuery (every 24 hours for example) as exports from Firebase create a new table everyday, or a single view gathering the data from the tables created daily. Is it possible to do such things with the WebUI ? 回答1: You can create a view over a wildcard table so that you don't need to update it each day. Here is an example view definition, using the query from one of

How do I access the cacheHit property of my BigQuery result set?

拈花ヽ惹草 提交于 2020-01-05 05:17:06
问题 Apparently, when using the BigQuery API, there is a cacheHit property of a BigQuery result. I've tried finding this property and I'm not sure how I need to access it. Here's my Java code that uses the BigQuery API. cacheHit isn't a property of the TableResult tr that I get: try { QueryJobConfiguration queryJobConfiguration = QueryJobConfiguration.newBuilder( "mySQLqueryText" ) .setUseLegacySql(false) .setAllowLargeResults(false) .setUseQueryCache(true) .build(); try { TableResult tr =

Event data, sent from via Google Tag Manager, not visible in Google Bigquery

自作多情 提交于 2020-01-05 04:56:09
问题 I created some usual events in Google Tag Manager: Category, Action Label. I see them in Google Analytics Reports, but I don't see them in row Google Bigquery Streaming. Here is an event in Tag Manager I see it in Google Analytics Row But nothing in Big Query Has anybody met this problem? I have found absolutely nothing anywhere (but maybe I queried Google Search incorrectly). Please help. 回答1: To avoid errors while exporting data from GA to BigQuery you need to verify the following as