How to query for data in streaming buffer ONLY in BigQuery?

后端 未结 2 1917
灰色年华
灰色年华 2021-01-05 22:11

We have a table partitioned by day in BigQuery, which is updated by streaming inserts.

The doc says that: \"when streaming to a partitioned table, data in the strea

2条回答
  •  天命终不由人
    2021-01-05 23:11

    Data in the streaming buffer has a NULL value for the _PARTITIONTIME column.

    SELECT
      fields
    FROM
      `dataset.partitioned_table_name`
    WHERE
      _PARTITIONTIME IS NULL
    

    https://cloud.google.com/bigquery/docs/partitioned-tables#copying_to_partitioned_tables

提交回复
热议问题