ExamGecko
Question list
Search
Search

List of questions

Search

Related questions











Question 62 - Professional Data Engineer discussion

Report
Export

How would you query specific partitions in a BigQuery table?

A.
Use the DAY column in the WHERE clause
Answers
A.
Use the DAY column in the WHERE clause
B.
Use the EXTRACT(DAY) clause
Answers
B.
Use the EXTRACT(DAY) clause
C.
Use the __PARTITIONTIME pseudo-column in the WHERE clause
Answers
C.
Use the __PARTITIONTIME pseudo-column in the WHERE clause
D.
Use DATE BETWEEN in the WHERE clause
Answers
D.
Use DATE BETWEEN in the WHERE clause
Suggested answer: C

Explanation:

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')

Reference: https://cloud.google.com/bigquery/docs/partitionedtables#the_partitiontime_pseudo_column

asked 18/09/2024
Phillip Doman
34 questions
User
Your answer:
0 comments
Sorted by

Leave a comment first