nerdexam
Google

PROFESSIONAL-DATA-ENGINEER · Question #8

You are building new real-time data warehouse for your company and will use Google BigQuery streaming inserts. There is no guarantee that data will only be sent in once but you do have a unique ID for

The correct answer is D. Use the ROW_NUMBER window function with PARTITION by unique ID along with WHERE row equals 1.. Explanation/Reference: https://cloud.google.com/bigquery/docs/reference/standard-sql/analytic-function-concepts

Submitted by fatima_kr· Mar 30, 2026Building and operationalizing data processing systems

Question

You are building new real-time data warehouse for your company and will use Google BigQuery streaming inserts. There is no guarantee that data will only be sent in once but you do have a unique ID for each row of data and an event timestamp. You want to ensure that duplicates are not included while interactively querying data. Which query type should you use?

Options

  • AInclude ORDER BY DESK on timestamp column and LIMIT to 1.
  • BUse GROUP BY on the unique ID column and timestamp column and SUM on the values.
  • CUse the LAG window function with PARTITION by unique ID along with WHERE LAG IS NOT NULL.
  • DUse the ROW_NUMBER window function with PARTITION by unique ID along with WHERE row equals 1.

How the community answered

(24 responses)
  • A
    4% (1)
  • B
    8% (2)
  • C
    17% (4)
  • D
    71% (17)

Explanation

Explanation/Reference: https://cloud.google.com/bigquery/docs/reference/standard-sql/analytic-function-concepts

Topics

#BigQuery streaming inserts#deduplication#ROW_NUMBER window function#data quality

Community Discussion

No community discussion yet for this question.

Full PROFESSIONAL-DATA-ENGINEER Practice