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?
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.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With