Databricks Certified Associate Developer for Apache Spark 3.5-Python Databricks-Certified-Associate-Developer-for-Apache-Spark-3.5 Question # 19 Topic 2 Discussion

Databricks Certified Associate Developer for Apache Spark 3.5-Python Databricks-Certified-Associate-Developer-for-Apache-Spark-3.5 Question # 19 Topic 2 Discussion

Databricks-Certified-Associate-Developer-for-Apache-Spark-3.5 Exam Topic 2 Question 19 Discussion:
Question #: 19
Topic #: 2

A developer is trying to join two tables,sales.purchases_fctandsales.customer_dim, using the following code:

Databricks-Certified-Associate-Developer-for-Apache-Spark-3.5 Question 19

fact_df = purch_df.join(cust_df, F.col('customer_id') == F.col('custid'))

The developer has discovered that customers in thepurchases_fcttable that do not exist in thecustomer_dimtable are being dropped from the joined table.

Which change should be made to the code to stop these customer records from being dropped?


A.

fact_df = purch_df.join(cust_df, F.col('customer_id') == F.col('custid'), 'left')


B.

fact_df = cust_df.join(purch_df, F.col('customer_id') == F.col('custid'))


C.

fact_df = purch_df.join(cust_df, F.col('cust_id') == F.col('customer_id'))


D.

fact_df = purch_df.join(cust_df, F.col('customer_id') == F.col('custid'), 'right_outer')


Get Premium Databricks-Certified-Associate-Developer-for-Apache-Spark-3.5 Questions

Contribute your Thoughts:


Chosen Answer:
This is a voting comment (?). It is better to Upvote an existing comment if you don't have anything to add.