
Answer-first summary for fast verification
Answer: SELECT pipeline_name, timestamp, source_table, target_table FROM events_log WHERE event_type = 'data_processing' ORDER BY timestamp DESC;
The correct SQL query must filter the events_log table to include only 'data_processing' events, which are relevant for audit logging and data lineage tracking. Additionally, ordering the results by timestamp in descending order ensures that the most recent activities are reviewed first, facilitating compliance monitoring and troubleshooting. Therefore, the query that best meets these requirements is: SELECT pipeline_name, timestamp, source_table, target_table FROM events_log WHERE event_type = 'data_processing' ORDER BY timestamp DESC;
Author: LeetQuiz Editorial Team
Ultimate access to all questions.
As a data engineer at a financial services company, you are responsible for implementing a data pipeline that processes sensitive customer transactions. The pipeline must include audit logging to track data lineage for compliance with regulatory requirements. You need to query the events log to retrieve detailed information about each data processing event, including the pipeline name, timestamp, and the source and target tables involved. The query must ensure that only relevant data processing events are considered and that the results are presented in a way that facilitates easy review of the most recent activities first. Which SQL query best meets these requirements? (Choose one option.)
A
SELECT pipeline_name, timestamp, source_table, target_table FROM events_log;
B
SELECT pipeline_name, timestamp, source_table, target_table FROM events_log WHERE event_type = 'data_processing';
C
SELECT pipeline_name, timestamp, source_table, target_table FROM events_log ORDER BY timestamp DESC;
D
SELECT pipeline_name, timestamp, source_table, target_table FROM events_log WHERE event_type = 'data_processing' ORDER BY timestamp DESC;
No comments yet.