Questions and Answers
Question rnFB2GLwmLx1aziPGrhl
Question
A data engineer runs a statement every day to copy the previous day’s sales into the table transactions. Each day’s sales are in their own file in the location “/transactions/raw”.
Today, the data engineer runs the following command to complete this task:
//IMG//
After running the command today, the data engineer notices that the number of records in table transactions has not changed.
What explains why the statement might not have copied any new records into the table?
Choices
- A: The format of the files to be copied were not included with the FORMAT_OPTIONS keyword.
- B: The COPY INTO statement requires the table to be refreshed to view the copied rows.
- C: The previous day’s file has already been copied into the table.
- D: The PARQUET file format does not support COPY INTO.
answer?
Answer: C Answer_ET: C Discussion
Comment 1218493 by MDWPartners
- Upvotes: 3
Repeated, correct.
Question DxPV277yJhl6Y3TORBBz
Question
Which command can be used to write data into a Delta table while avoiding the writing of duplicate records?
Choices
- A: DROP
- B: INSERT
- C: MERGE
- D: APPEND
answer?
Answer: C Answer_ET: C Community answer C (100%) Discussion
Comment 1285873 by CommanderBigMac
- Upvotes: 1
Selected Answer: C The Merge command checks for duplicates and ignores them
Comment 1218491 by MDWPartners
- Upvotes: 3
Repeated, correct.
Question vEQRkhP4UsW0N3NCPPuQ
Question
A data analyst has created a Delta table sales that is used by the entire data analysis team. They want help from the data engineering team to implement a series of tests to ensure the data is clean. However, the data engineering team uses Python for its tests rather than SQL.
Which command could the data engineering team use to access sales in PySpark?
Choices
- A: SELECT * FROM sales
- B: spark.table(“sales”)
- C: spark.sql(“sales”)
- D: spark.delta.table(“sales”)
answer?
Answer: B Answer_ET: B Discussion
Comment 1218494 by MDWPartners
- Upvotes: 3
Repeated, correct.
Question 0rGo35Q7LYULQH6s3bEg
Question
A data engineer has created a new database using the following command:
CREATE DATABASE IF NOT EXISTS customer360;
In which location will the customer360 database be located?
Choices
- A: dbfs:/user/hive/database/customer360
- B: dbfs:/user/hive/warehouse
- C: dbfs:/user/hive/customer360
- D: dbfs:/user/hive/database
answer?
Answer: B Answer_ET: B Community answer B (100%) Discussion
Comment 1316018 by 806e7d2
- Upvotes: 3
Selected Answer: B It’s duplicate for question we had before
Comment 1218495 by MDWPartners
- Upvotes: 4
Repeated, correct.
Question CdXnunYEVub9xYMp0KCQ
Question
A data engineer is attempting to drop a Spark SQL table my_table and runs the following command:
DROP TABLE IF EXISTS my_table;
After running this command, the engineer notices that the data files and metadata files have been deleted from the file system.
What is the reason behind the deletion of all these files?
Choices
- A: The table was managed
- B: The table’s data was smaller than 10 GB
- C: The table did not have a location
- D: The table was external
answer?
Answer: A Answer_ET: A Community answer A (100%) Discussion
Comment 1291132 by alinavit
- Upvotes: 1
Selected Answer: A A is correct
Comment 1286851 by Stefan94
- Upvotes: 1
Selected Answer: A Correct Answer is A
Comment 1244578 by 3fbc31b
- Upvotes: 2
Selected Answer: A The correct answer is A. BOTH data and metadata were deleted meaning the table was managed. If the metadata was gone, but the actual data files themselves were still there then it would be an external table.
Comment 1235152 by yolandi
- Upvotes: 1
also go with A
Comment 1230473 by 31cadd7
- Upvotes: 1
Selected Answer: A it’s A
Comment 1217916 by THC1138
- Upvotes: 1
Selected Answer: A For D to be correct, the metadata would have been deleted, but the data would still exist. The answer is A
Comment 1215958 by PreranaC
- Upvotes: 1
Selected Answer: A A - Both Data was deleted as well along with Metadata
Comment 1209371 by Ivan_Petrov
- Upvotes: 1
Answer should be A as data was deleted table was managed
Comment 1208987 by jetplanes
- Upvotes: 3
Selected Answer: A The answer should be A ⇒ the table was MANAGED. If the metadata and the underlined files have been deleted, then this is a MANAGED table and not an external table.