PROFESSIONAL-DATA-ENGINEER · Question #62
How would you query specific partitions in a BigQuery table?
The correct answer is C. Use the __PARTITIONTIME pseudo-column in the WHERE clause. Explanation/Reference: Partitioned tables include a pseudo column named _PARTITIONTIME that contains a date-based timestamp for data loaded into the table. To limit a query to particular partitions (such as Jan 1st and 2nd of 2017), use a clause similar to this: WHERE…
Question
Options
- AUse the DAY column in the WHERE clause
- BUse the EXTRACT(DAY) clause
- CUse the __PARTITIONTIME pseudo-column in the WHERE clause
- DUse DATE BETWEEN in the WHERE clause
How the community answered
(37 responses)- A3% (1)
- B11% (4)
- C81% (30)
- D5% (2)
Explanation
Explanation/Reference: Partitioned tables include a pseudo column named _PARTITIONTIME that contains a date-based timestamp for data loaded into the table. To limit a query to particular partitions (such as Jan 1st and 2nd of 2017), use a clause similar to this: WHERE _PARTITIONTIME BETWEEN TIMESTAMP('2017-01-01') AND TIMESTAMP('2017-01-02')
Topics
Community Discussion
No community discussion yet for this question.