Topic 1 Question 256
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?
- Enable Private Google Access in the subnetwork, and set up Cloud Storage notifications to a Pub/Sub topic.
- Create a push subscription that points to the web server URL.
- Enable the Cloud Composer API, and set up Cloud Storage notifications to trigger a Cloud Function.
- Write a Cloud Function instance to call the DAG by using the Cloud Composer API and the web server URL.
- Use VPC Serverless Access to reach the web server URL.
- Enable the Airflow REST API, and set up Cloud Storage notifications to trigger a Cloud Function instance.
- Create a Private Service Connect (PSC) endpoint.
- Write a Cloud Function that connects to the Cloud Composer cluster through the PSC endpoint.
- Enable the Airflow REST API, and set up Cloud Storage notifications to trigger a Cloud Function instance.
- Write a Cloud Function instance to call the DAG by using the Airflow REST API and the web server URL.
- Use VPC Serverless Access to reach the web server URL.
ユーザの投票
コメント(2)
- 正解だと思う選択肢: C
- Enable Airflow REST API: In Cloud Composer, enable the "Airflow web server" option.
- Set Up Cloud Storage Notifications: Create a notification for new files, routing to a Cloud Function.
- Create PSC Endpoint: Establish a PSC endpoint for Cloud Composer.
- Write Cloud Function: Code the function to use the Airflow REST API (via PSC endpoint) to trigger the DAG.
======== Why not Option D
- Using the web server URL directly wouldn't work without internet access or a direct path to the web server.
👍 2raaad2024/01/05 - 正解だと思う選択肢: C
C.
- Enable the Airflow REST API, and set up Cloud Storage notifications to trigger a Cloud Function instance.
- Create a Private Service Connect (PSC) endpoint.
- Write a Cloud Function that connects to the Cloud Composer cluster through the PSC endpoint.
👍 1scaenruy2024/01/03
シャッフルモード