Cannot create a PARTITION BY DATE(timestamp)

Viewed 40

Hello I am using my personal GCP account to play around in Bigquery, and I am still within my free-tier range (a billing account is linked, but no fees incurred yet).

So I create a table to fetch baseball.games_wide table from bigquery-public-dataset. The following is my simple CREATE TABLE query with PARTITION on a timestamp column 'startTime'.

CREATE TABLE project.table
PARTITION BY date(startTime) AS

SELECT 
    gameId, seasonID, date(startTime) as game_date, startTime, year
FROM `bigquery-public-data.baseball.games_wide`
WHERE YEAR = 2016

The table was created successfully and I can see the worker has the write phase, which is an indicator that something is writing to the table. However, when I go to 'Preview' the table, there is no data to display, and table size is 0 KB.

enter image description here

I tried remove the second line (i.e., PARTITION BY date(startTime)) when creating table, the data can be ingested and I am able to Preview it in console. It seems the PARTITION command is causing problem, but I can't tell where goes wrong. Any idea?

1 Answers

As you have mentioned in the comment this issue is resolved by creating a new dataset after the billing account is linked to the project.

You can follow this tutorial to create billing account and link it to project.

Related