You are using the Snowflake Spark connector to update records in a Snowflake table based on data from a Spark DataFrame. The Snowflake table 'CUSTOMER' has columns 'CUSTOMER ID' (primary key), 'NAME, and 'ADDRESS'. You have a Spark DataFrame with updated 'NAME and 'ADDRESS' values for some customers. To optimize performance and minimize data transfer, which of the following strategies can you combine with a temporary staging table to perform an efficient update?
Correct Answer: A,D
Options A and D are the most efficient. Writing to a temporary table allows Snowflake to perform the update operation using its optimized internal processes. The MERGE command is designed for efficient upserts and is preferred over individual UPDATE statements. Option B is highly inefficient due to the overhead of multiple individual queries. Option C is also not optimal, as UDFs don't necessarily improve performance for simple UPDATE operations and broadcasting data is not needed. Option E can also be an approach for batch update, its effective way for the performance but its less compared with option A and D.