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?