Professional Data Engineer Practice Questions

Google Cloud Professional Data Engineer exam preparation

Professional Data Engineer practice questions in English: 180 questions with explanations. The mock exam has 50 questions and 120 minutes.

Professional Data Engineer free question 4 / 10 · Domain 2: Ingesting and processing the data

For BigQuery federated queries, which statement about the combination of the dataset location and the external database location matches the "Introduction to federated queries" page?

  1. A single-region BigQuery dataset can also query an external database such as Cloud SQL in a different region within the same larger geography
  2. Spanner can be queried only if the instance has a regional configuration and is in the same region as the dataset
  3. When you query an external database from a multi-region dataset, the query processing location is the US or EU multi-region
  4. Cloud SQL instances can also be placed in a multi-region location, so you can set up queries between multi-regions
Show the answer and explanation

Answer: C

Why this is correct
The "Supported regions" section for AlloyDB and Cloud SQL says that a query run in the BigQuery US multi-region can query any single region in the US geography (such as us-central1, us-east4, or us-west2), and a query run in the EU multi-region can query any single region in an EU member state. It then says the query processing location is the US or EU multi-region. The processing location is that of the multi-region the query runs in, not the region of the external database.

Why the other options are wrong
"A single-region BigQuery dataset can also query an external database such as Cloud SQL in a different region within the same larger geography" … The "Supported regions" section says a single BigQuery region can query only resources in the same region. For a dataset in us-east4, you can query only Cloud SQL or AlloyDB instances in us-east4.
"Cloud SQL instances can also be placed in a multi-region location, so you can set up queries between multi-regions" … The section says Cloud SQL instances cannot use multi-region locations; multi-region is used only for backups.
"Spanner can be queried only if the instance has a regional configuration and is in the same region as the dataset" … The Spanner section says it supports both regional and multi-region configurations, and that from a single region or a multi-region in BigQuery you can query a Spanner instance in any supported region.

Key point
The location where the query runs must be the same as the location of the connection resource, so a query run from the US multi-region uses a connection in the US multi-region. A query that starts from a multi-region can no longer refer to a single-region connection, so recreate such connections in the same multi-region as the query. Performance depends on how close the dataset and the external data source are: between the US multi-region and Cloud SQL in us-central1 it is fast, but with Cloud SQL in us-east4 it can be slower.

Go to the Professional Data Engineer practice app (10 free questions; purchase unlocks all questions)

See the full practice set