Google Cloud Professional Data Engineer — Question 185

You are deploying an Apache Airflow directed acyclic graph (DAG) in a Cloud Composer 2 instance. You have incoming files in a Cloud Storage bucket that the DAG processes, one file at a time. The Cloud Composer instance is deployed in a subnetwork with no Internet access. Instead of running the DAG based on a schedule, you want to run the DAG in a reactive way every time a new file is received. What should you do?

Answer options

Correct answer: C

Explanation

Option C is correct because it enables the Airflow REST API and utilizes Cloud Storage notifications to trigger a Cloud Function that can connect to the Cloud Composer cluster via a Private Service Connect (PSC) endpoint, which is essential for the lack of Internet access. The other options either do not leverage the optimal API setup or fail to include necessary components like PSC, making them less effective for the given scenario.