Reputation: 1526
I want to create day-partitioned data and load data from Cloude Storage. Step I've done
bq mk --time_partitioning_type=DAY myDataSet.dailytable
bq load --source_format=AVRO myProjectId:myDataSet.dailytable$20150510 gs://myBucket/path/2016-05-10/*
Actual result:
I have 2 tables: dailyTable and dailyTable$0150510
Expected result:
I have 2 tables dailyTable and dailyTable$20150510
Is that expected behaviour?
Upvotes: 4
Views: 5282
Reputation: 2315
On the Unix shell '$' is a special character, you will need to escape it, or put the whole table name in single quotes as described here:
https://cloud.google.com/bigquery/docs/partitioned-tables#addressing_table_partitions
You will not end up with two tables this way. The myDataSet.dailytable will have a single partitioned 'myDataSet.dailytable$20150510' corresponding to the 10th of May 2015. The partition is addressable as if it were a table.
Upvotes: 7