Free Google Professional Data Engineer Exam Braindumps (page: 17)

Which of the following statements about Legacy SQL and Standard SQL is not true?

  1. Standard SQL is the preferred query language for BigQuery.
  2. If you write a query in Legacy SQL, it might generate an error if you try to run it with Standard SQL.
  3. One difference between the two query languages is how you specify fully-qualified table names (i.e. table names that include their associated project name).
  4. You need to set a query language for each dataset and the default is Standard SQL.

Answer(s): D

Explanation:

You do not set a query language for each dataset. It is set each time you run a query and the default query language is Legacy SQL.

Standard SQL has been the preferred query language since BigQuery 2.0 was released.

In legacy SQL, to query a table with a project-qualified name, you use a colon, :, as a separator. In standard SQL, you use a period, ., instead.

Due to the differences in syntax between the two query languages (such as with project-qualified table names), if you write a query in Legacy SQL, it might generate an error if you try to run it with

Standard SQL.


Reference:

https://cloud.google.com/bigquery/docs/reference/standard-sql/migrating-from-legacy-sql



How would you query specific partitions in a BigQuery table?

  1. Use the DAY column in the WHERE clause
  2. Use the EXTRACT(DAY) clause
  3. Use the __PARTITIONTIME pseudo-column in the WHERE clause
  4. Use DATE BETWEEN in the WHERE clause

Answer(s): 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/partitioned- tables#the_partitiontime_pseudo_column



Which SQL keyword can be used to reduce the number of columns processed by BigQuery?

  1. BETWEEN
  2. WHERE
  3. SELECT
  4. LIMIT

Answer(s): C

Explanation:

SELECT allows you to query specific columns rather than the whole table.

LIMIT, BETWEEN, and WHERE clauses will not reduce the number of columns processed by

BigQuery.


Reference:

https://cloud.google.com/bigquery/launch-
checklist#architecture_design_and_development_checklist



To give a user read permission for only the first three columns of a table, which access control method would you use?

  1. Primitive role
  2. Predefined role
  3. Authorized view
  4. It's not possible to give access to only the first three columns of a table.

Answer(s): C

Explanation:

An authorized view allows you to share query results with particular users and groups without giving them read access to the underlying tables. Authorized views can only be created in a dataset that does not contain the tables queried by the view.

When you create an authorized view, you use the view's SQL query to restrict access to only the rows and columns you want the users to see.


Reference:

https://cloud.google.com/bigquery/docs/views#authorized-views






Post your Comments and Discuss Google Professional Data Engineer exam prep with other Community members:

Professional Data Engineer Exam Discussions & Posts