Certified Data Engineer Professional Exam QuestionsBrowse all questions from this exam

Certified Data Engineer Professional Exam - Question 124


A junior member of the data engineering team is exploring the language interoperability of Databricks notebooks. The intended outcome of the below code is to register a view of all sales that occurred in countries on the continent of Africa that appear in the geo_lookup table.

Before executing the code, running SHOW TABLES on the current database indicates the database contains only two tables: geo_lookup and sales.

What will be the outcome of executing these command cells m order m an interactive notebook?

Show Answer
Correct Answer: D

Cmd 1 uses Python to create a list of countries in the continent 'AF' from the 'geo_lookup' table. The resulting variable 'countries_af' is a Python list of strings. Cmd 2 uses SQL to create a view 'sales_af' that filters the 'sales' table based on entries in 'countries_af'. However, since 'countries_af' is a Python list and not accessible directly in the SQL context, Cmd 2 will fail.

Discussion

2 comments
Sign in to comment
hpkrOption: D
Jun 12, 2024

D is correct

vexor3Option: D
Jul 20, 2024

D is correct