nerdexam
Google

PROFESSIONAL-CLOUD-DEVELOPER · Question #75

You have a data warehouse built on BigQuery that contains a table with array fields. To analyze the data for a specific use case using Standard SQL, you need to read all elements from the array and wr

The correct answer is D. Perform UNNEST and CROSS JOIN with the table to get these results.. A is not correct because it does not join the records. B is not correct because it might lose records. C is not correct because it might lose records. D is correct because it does not lose records when the join is performed. https://cloud.google.com/bigquery/docs/reference/standa

Implementing BigQuery for Data Processing

Question

You have a data warehouse built on BigQuery that contains a table with array fields. To analyze the data for a specific use case using Standard SQL, you need to read all elements from the array and write them with all other non-array fields in a table. You don't want to lose any records if they don't match records in the array fields. What should you do?

Options

  • APerform SELECT * FROM tablename.
  • BPerform UNNEST and JOIN with the table to get these results.
  • CPerform UNNEST and INNER JOIN with the table to get these results.
  • DPerform UNNEST and CROSS JOIN with the table to get these results.

How the community answered

(23 responses)
  • A
    4% (1)
  • B
    13% (3)
  • C
    4% (1)
  • D
    78% (18)

Explanation

A is not correct because it does not join the records. B is not correct because it might lose records. C is not correct because it might lose records. D is correct because it does not lose records when the join is performed. https://cloud.google.com/bigquery/docs/reference/standard-sql/query-syntax#join-types

Topics

#BigQuery#SQL#UNNEST#Data Transformation

Community Discussion

No community discussion yet for this question.

Full PROFESSIONAL-CLOUD-DEVELOPER Practice