In bigquery timed tables, when data is written to __UNPARTITIONED__? what are the effects?

I came across some inept undocumented table behavior with large sections:

I created a time-based table in BigQuery and inserted the data. I was able to insert normally - the data was written to the current partition (I could also explicitly specify the partition and write to it)

After some tests with new data, I deleted today's section to have clean data: (CLI)

bq --project_id=my-project rm v1.mytable$20160613

Then I checked if it is empty:

select count(*) from [v1.mytable]

270 result instead of 0

I tried deleting and retrying the query again - the same result. Therefore I requested

select count(*) from [v1.mytable$20160613]

Result 0

so a couple of previous dates that I might have inserted data into, but all were 0. Finally, I ran

SELECT partition_id from [v1.mytable$__PARTITIONS_SUMMARY__];

{ 20160609 20160613}

UNPARTITIONED

:

  • ?
  • , ( ..)? ?
+4
2
  • , UNPARTITIONED. , NULL - _PARTITIONTIME.

    SELECT ... FROM mydataset.mypartitioned_table WHERE _PARTITIONTIME IS NULL

  • , , . :

    bq query --destination_table=mydataset.mypartitionedtable\$20160121 --replace 'SELECT 1 as field1, "one" as field2 FROM (SELECT 1 as field1, "one" as field2) WHERE FALSE'

, ( SELECT * $__ PARTITIONS__SUMMARY), 0 .

$ bq query 'SELECT COUNT(*) from [mydataset.mypartitionedtable$20160121]'

+-----+
| f0_ |
+-----+
|   0 |
+-----+
+7

- .

, : , ,

+3

All Articles