1
votes

I'm trying to test this statement out: https://cloud.google.com/bigquery/docs/reference/standard-sql/other-statements#export_data_statement

Correct me if I'm wrong, but you can export query results to GCS? Then why am I consistently getting the following error?

EXPORT DATA OPTIONS(
  uri='gs://my-test-bucket/*.json',
  format='JSON',
  overwrite=true
  ) AS
select status, count(1) as count
from `bigquery-public-data.austin_311.311_service_requests`
where created_date >= '2018-01-01'
and created_date < '2018-01-02'
group by 1
Cannot set write disposition in jobs with EXPORT statement

I've tried existing buckets, non-existing buckets, wildcards, no wildcards, changed the overwrite to False, used public and non-public datasets, nothing works. Am I missing something obvious here?

1

1 Answers

1
votes

If you are in the Console UI - do below

Clink More then Query Settings

enter image description here

Then make sure you check Destination as below

enter image description here

... and don't forget to Save settings