Databricks Certified Data Engineer - Professional

Databricks Certified Data Engineer - Professional

Get started today

Ultimate access to all questions.


A junior data engineer is working with Databricks notebook language interoperability. The goal is to create a view showing all sales from African countries listed in the geo_lookup table. The current database contains only two tables: geo_lookup and sales.

The following code is executed:

%python
countries_af = [x[0] for x in 
spark.table("geo_lookup").filter("continent='AF'").select("country").collect()]
%sql
CREATE VIEW sales_af AS
SELECT *
FROM sales
WHERE country IN (countries_af)
AND continent = 'AF'

What will be the result of executing these command cells sequentially in an interactive notebook?