QuestionQ228
VerifiedApache Spark Architecture and ComponentsA data engineer has written the following code to join two DataFrames, df1 and df2:
df1 = spark.read.csv("sales_data.csv")
df2 = spark.read.csv("product_data.csv")
result = df1.join(df2, df1.product_id == df2.product_id)
The df1 DataFrame holds e-commerce sales data and is approximately 10 GB in size, while df2 holds product data and is approximately 8 MB.
Which join strategy will Spark use?
Community Discussion