google-bigquery Questions

3

Solved

Is there a way to extract the complete BigQuery partitioned table with one command so that data of each partition is extracted into a separate folder of the format part_col=date_yyyy-mm-dd Since B...
Earring asked 2/7, 2019 at 14:38

7

Solved

I have a database in a Cloud SQL instance. I would like to copy its content into BigQuery in order to perform analysis. It is not a requirement for me to continuously update the BigQuery dataset. I...
Cleveite asked 3/12, 2017 at 22:46

5

Solved

The mode is the value that appears most often in a set. I would like something like: SELECT t.id as t_id, GROUP_CONCAT(t.value) as value_list, MODE(t.value) AS value_mode FROM dataset.table a...
Particle asked 27/10, 2015 at 14:32

3

Solved

I'm trying to automatically generate a new daily table using the bq command line too bq query \ --destination_table=<destination> \ --allow_large_results \ --noflatten_results \ '<que...
Billiebilling asked 20/11, 2015 at 19:54

3

I am trying to add a service account key file to access a bigquery data set in power bi. I am selecting service account login during the set up process. I added the service account email as well as...

3

Solved

In my CENSUS table, I'd like to group by State, and for each State get the median county population and the number of counties. In psql, redshift, and snowflake, I can do this: psql=> SELECT s...
Catalepsy asked 9/8, 2017 at 0:2

4

I'm trying to change the datatype for a column in my bigquery table from INT64 to STRING with the condition it's not NULL. When I type: ALTER TABLE table_name ALTER COLUMN id STRING NOT NULL I get ...
Newspaperwoman asked 8/9, 2021 at 4:20

4

Solved

When using LAG() (in BigQuery standard SQL), how do you skip NULL values so that it takes the first preceding value which is not NULL? I've prepared some sample rows in the same format in the sou...
Poverty asked 24/4, 2017 at 10:51

7

Solved

I have a quite huge existing partitioned table in bigquery. I want to make the table clustered, at least for the new partition. From the documentation: https://cloud.google.com/bigquery/docs/creat...
Athena asked 29/8, 2018 at 12:29

5

Solved

I have data like: id col1 col2 ----------------- 1 [1,2] [2,3] 2 [4,4,6] [6,7] and I want to have data like: id col3 --------- 1 [2] 2 [6] Any smart solutions for this?
Stressful asked 8/8, 2018 at 11:53

6

Google BigQuery - bq command enable you to create, load, query and alter table. I did not find any documentation regarding dropping table, will be happy to know how to do it. I found the bq tool ...
Spancake asked 4/5, 2015 at 8:46

2

Solved

I have a TIMESTAMP column with dates that I need to filter. I need to grab the data that is 5 days old. So current date - 5 days. My data is in BigQuery. I tried the following query: where created_...
Translative asked 7/4, 2021 at 16:39

6

Solved

Is there a way to list all the table size in BigQuery? I know a command like this: select table_id, sum(size_bytes)/pow(10,9) as size from certain_dataset.__TABLES__ group by 1 But I want...
Allynallys asked 18/10, 2018 at 9:7

8

Solved

I would like to transfer data from a table in BigQuery, into another one in Redshift. My planned data flow is as follows: BigQuery -> Google Cloud Storage -> Amazon S3 -> Redshift I know about Go...
Chufa asked 5/9, 2016 at 11:25

7

I have tried installing it in the terminal and in juypter lab and it says that it has been successfully installed but when I run df = query_job.to_dataframe() I keep getting the error " ValueE...
Spelter asked 13/12, 2020 at 13:3

8

When I attempt load data into BigQuery from Google Cloud Storage it asks for the Google Cloud Storage URI (gs://). I have reviewed all of your online support as well as stackoverflow and cannot fin...

4

Solved

Let's say I have a table in BigQuery containing 2 columns. The first column represents a name, and the second is a delimited list of values, of arbitrary length. Example: Name | Scores -----+-----...
Fancher asked 16/10, 2013 at 21:6

3

Solved

I'm working on building a follow-network form Github's available data on Google BigQuery, e.g.: https://bigquery.cloud.google.com/table/githubarchive:day.20210606 The key data is contained in the &...
Gregoor asked 7/2, 2022 at 1:30

4

Solved

I would like to add an column to an already existing table without using legacy SQL. The basic SQL syntax for this is: ALTER TABLE table_name ADD column_name datatype; I formatted the query for...
Across asked 23/5, 2017 at 9:44

5

Solved

How to get the name of the day from date in Google BigQuery. I can achieve this by below query SELECT CASE WHEN DAYOFWEEK(CURRENT_DATE())=1 THEN 'Sunday' WHEN DAYOFWEEK(CURRENT_DATE())=2 THEN 'M...
Breakfast asked 9/7, 2015 at 13:30

2

We are currently using Stitchdata to periodically sync data over from a PostgreSQL instance to a BigQuery instance. The data is used for building reports. Stitchdata allows a pipeline to be built w...
Dias asked 24/6, 2021 at 22:32

2

Solved

I have a table with loads of fields, and I am trying to group by all except two values which I am summing on. I would like to do something like SELECT my_table.* except(value_1, value_2) , sum(v...
Pitchblack asked 20/2, 2019 at 17:42

3

I have 2 tables in BigQuery and I want to merge their columns together and stack the data to get 1 big table with all the data. Effectively, the tables contain same data, but few columns have diffe...
Vitals asked 3/8, 2016 at 10:43

9

Solved

I am trying to select data from the latest partition in a date-partitioned BigQuery table, but the query still reads data from the whole table. I've tried (as far as I know, BigQuery does not supp...
Elliottellipse asked 27/9, 2016 at 20:34

3

Solved

Hi following is my query to fetch some data in big query want to know how can we format date and time stamp SELECT * FROM ( SELECT ( SELECT x.value FROM UNNEST(user_properties) x WHERE x...
Guelders asked 9/12, 2019 at 19:40

© 2022 - 2025 — McMap. All rights reserved.