Ultimate access to all questions.
accountDF = spark.table("accounts")
orderDF = spark.table("orders")
itemDF = spark.table("items")
orderWithItemDF = (orderDF.join(
itemDF,
orderDF.itemID == itemDF.itemID)
.select(
orderDF.accountID,
orderDF.itemID,
itemDF.itemName)
)
finalDF = (accountDF.join(
orderWithItemDF,
accountDF.accountID == orderWithItemDF.accountID)
.select(
orderWithItemDF["*"],
accountDF.city)
)
(finalDF.write
.mode("overwrite")
.table("enriched_itemized_orders_by_account"))
Question
Assuming this code produces logically correct results and the source tables have been deduplicated and validated, what will happen when this code is executed?