sovan
sovan

Reputation: 373

Create an empty table in BigQuery

I am trying to create an empty table. I would add the data to this table via a separate job. So , I don't have any predefined dataset . I used this query

CREATE TABLE IF NOT EXISTS 
test_ds.table1
(
  col1 string
)

But this gave an error

Not found: Dataset <default_project_name>:test_ds was not found in location US

In scenarios , where we want to create an empty table and define the schema and then add the data to it separately , how do we proceed?

Upvotes: 0

Views: 3474

Answers (1)

Sergey Geron
Sergey Geron

Reputation: 10232

You need to create a dataset first:

CREATE SCHEMA test_ds

Upvotes: 1

Related Questions