DATABRICKS-DATA-ANALYST-ASSOCIATE practice question 7 of 15
A data analyst runs the following command: INSERT INTO stakeholders.suppliers TABLE stakeholders.new_suppliers; What is the result of running this command?
Full set: 117 questionsThe INSERT INTO command is used to add new rows of data to an existing table. The syntax INSERT INTO targettable TABLE sourcetable is a valid Databricks SQL command that appends all rows from the sourcetable (stakeholders.newsuppliers) to the targettable (stakeholders.suppliers). This operation does not remove or alter the existing data in the target table, nor does it automatically check for or remove duplicate rows. Therefore, the suppliers table will contain its original data plus all the data from the newsuppliers table.
A: The INSERT INTO statement does not automatically delete duplicate data. A MERGE statement or a separate deduplication step would be required for that functionality. B: The syntax INSERT INTO ... TABLE ... is a valid and supported command in Databricks SQL for inserting all rows from one table into another. D: This describes a swap of data between two tables, which is not the function of an INSERT INTO command. E: This describes the behavior of an INSERT OVERWRITE command, which replaces all existing data in the target table, rather than appending to it.
1. Databricks SQL Language Reference
INSERT INTO: The official documentation states
"Inserts new rows into a table." It describes the action as adding data
not replacing it or performing deduplication. The contrast with INSERT OVERWRITE ("replaces the data of the table") and MERGE INTO (which has explicit clauses for handling matched rows) confirms this behavior.
Source: Databricks Documentation > SQL reference > Data manipulation language > INSERT INTO.
2. Databricks SQL Language Reference
INSERT OVERWRITE: This documentation explicitly states that INSERT OVERWRITE "replaces the data of the table
" which directly contradicts option E and highlights the appending nature of INSERT INTO.
Source: Databricks Documentation > SQL reference > Data manipulation language > INSERT OVERWRITE DIRECTORY and INSERT OVERWRITE TABLE.
Keep practicing
Take the free DATABRICKS-DATA-ANALYST-ASSOCIATE practice test
Ten exam-style questions with answers and explanations, plus the exam facts and study guides.
More questions
Other DATABRICKS-DATA-ANALYST-ASSOCIATE practice questions
- Question 1Which of the following statements about a refresh schedule is incorrect?
- Question 2A data analyst has been asked to produce a visualization that shows the flow of users thr…
- Question 3A data team has been given a series of projects by a consultant that need to be implement…
- Question 4A data analyst is attempting to drop a table my_table. The analyst wants to delete all ta…
- Question 5In which of the following situations will the mean value and median value of variable be …
- Question 6Which of the following benefits of using Databricks SQL is provided by Data Explorer?
