
Ultimate access to all questions.
Consider a scenario where you are tasked with updating a large dataset in a data warehouse. The dataset is frequently updated with new records and some records need to be overwritten due to changes in business requirements. Which SQL command would you use to efficiently handle this scenario, and why? Discuss the differences between using CREATE OR REPLACE TABLE and INSERT OVERWRITE in this context.
A
Use CREATE OR REPLACE TABLE because it allows for schema evolution and complete table replacement.
B
Use INSERT OVERWRITE because it allows for selective overwriting of data without affecting the table schema.
C
Use MERGE because it allows for both inserting new records and updating existing ones in a single operation.
D
Use COPY INTO because it allows for efficient data loading from external sources without duplication.