QuestionQ137

VerifiedProductionizing Data Pipelines

A data analyst has a series of queries in a SQL program. The data analyst wants this program to run every day. They only want the final query in the program to run on Sundays. They ask for help from the data engineering team to complete this task.

Which of the following approaches could be used by the data engineering team to complete this task?

Explanation

Wrapping SQL queries in PySpark leverages Python's control flow (if/datetime checks) to conditionally execute the final query only on Sundays. This approach allows selective execution logic without redesigning the data model or job scheduling infrastructure. Feature requests and access restrictions are impractical alternatives.

Community Discussion

No comments yet. Be the first to start the discussion!