Courseiva

CCNA Data Pipeline Orchestration Questions

36 questions · Data Pipeline Orchestration · All types, answers revealed

1
MCQmedium

You are using Airflow with a Cloud Composer environment. You want to ensure that a specific task runs on a specific day of the week. How do you configure the schedule?

A.Set 'schedule_interval' using cron syntax.
B.Create a separate DAG for each day of the week.
C.Enable the 'weekday_only' flag in the DAG configuration.
D.Use the 'timedelta' object with a 7-day offset.
AnswerA

Cron strings (e.g., '0 0 * * 1') allow for specific days.

Why this answer

The 'schedule_interval' parameter in the DAG definition supports cron syntax, which includes day-of-week specifications.

2
Multi-Selectmedium

Which TWO of the following are true about Workflows' serverless nature?

Select 2 answers
A.Requires a dedicated GKE cluster
B.Scales automatically
C.No infrastructure to manage
D.Is always free
E.Requires constant manual patching
AnswersB, C

Handles variable loads.

Why this answer

Serverless means no infrastructure management and auto-scaling based on demand.

3
MCQeasy

What is the primary function of the Airflow 'Executor' in Cloud Composer?

A.Serving the Airflow UI web pages.
B.Deciding how to distribute tasks to workers.
C.Storing the DAG file metadata.
D.Automatically scaling the GKE cluster.
AnswerB

The executor handles task distribution (e.g., Celery or Kubernetes executor).

Why this answer

The executor is responsible for managing the execution of tasks, determining how to distribute work to the workers.

4
Multi-Selecteasy

Which THREE of the following are components of a Workflows definition?

Select 3 answers
A.main
B.dag_schedule
C.variables
D.steps
E.worker_config
AnswersA, C, D

Required entry point.

Why this answer

Workflows consist of steps, main entry points, and can include variable assignments.

5
Multi-Selecteasy

Which TWO of the following services can trigger Workflows executions?

Select 2 answers
A.Cloud Functions
B.Cloud Logging
C.Cloud Build
D.Cloud Scheduler
E.Eventarc
AnswersD, E

Time-based triggering.

Why this answer

Cloud Scheduler and Eventarc are common triggers for Workflows.

6
MCQhard

A task in your Airflow DAG involves a long-running process that might exceed the default Airflow worker pod timeout. How should you handle this?

A.Move the task to a custom node pool in GKE.
B.Set the 'execution_timeout' parameter on the task instance.
C.Increase the 'default_dag_run_timeout'.
D.Decrease the number of parallel tasks.
AnswerB

This allows individual tasks to exceed default limits safely.

Why this answer

Adjust the 'execution_timeout' parameter for the specific task in the Airflow DAG definition to allow longer processing times.

7
Multi-Selectmedium

Which THREE of the following are key benefits of using Cloud Composer for data orchestration?

Select 3 answers
A.Uses standard open-source Airflow
B.Automatic data transformation
C.Free tier for all users
D.Fully managed infrastructure
E.Integration with GCP services
AnswersA, D, E

It is based on the community Airflow project.

Why this answer

Composer provides managed infrastructure, native integration with GCP services, and the extensive Airflow ecosystem.

8
MCQeasy

In Cloud Composer, what is the default behavior if a DAG execution takes longer than the 'dagrun_timeout' setting?

A.The DAG enters a 'running' state indefinitely.
B.The DAG run is paused.
C.The scheduler automatically restarts the DAG.
D.The DAG run is marked as failed.
AnswerD

Timeout triggers a failure state for the DAG run.

Why this answer

If a DAG run exceeds the timeout, Airflow marks the DAG run as 'failed'.

9
MCQhard

A Cloud Composer environment is experiencing high latency in the Airflow UI. What is a common cause and mitigation for this?

A.Excessive DAG complexity; optimize/simplify DAG code.
B.GKE node power failure; restart cluster.
C.Too many users logged in; force logout.
D.Browser cache; clear your local cache.
AnswerA

Complex DAGs increase parsing time, which impacts UI responsiveness.

Why this answer

High DAG count and complex dependency parsing can slow down the UI; using the 'DAG Serialization' feature (enabled by default in newer versions) helps, but optimizing DAG file size and complexity is the best mitigation.

10
MCQmedium

You need to pass a JSON object into a Workflows execution. How should you format the argument in the 'gcloud workflows executions' command?

A.Use the --data flag with a JSON string.
B.Pipe the JSON into the stdin of the command.
C.Use the --env-vars flag.
D.Upload the JSON to a GCS bucket and point to it.
AnswerA

The --data flag is the correct way to pass inputs.

Why this answer

The '--data' flag accepts a JSON string, which is the standard format for passing parameters to workflows.

11
Multi-Selectmedium

Which TWO of the following are best practices for managing Cloud Composer DAG dependencies?

Select 2 answers
A.Use plugins for shared code
B.Store DAGs in a database
C.Hardcode all configurations
D.Run all tasks in a single DAG file
E.Keep DAG files small
AnswersA, E

Plugins allow sharing reusable operators.

Why this answer

Best practices include keeping DAGs small and using modular code for shared tasks.

12
MCQhard

You are migrating a legacy Airflow environment to Cloud Composer. You need to ensure that local Python packages used by custom operators are installed correctly. What is the recommended approach?

A.Create a custom Docker image for the Airflow environment.
B.Upload the requirements.txt file to the environment bucket.
C.Manually SSH into worker nodes and run 'pip install'.
D.Pre-install packages in the DAG file using 'os.system'.
AnswerB

Composer automatically installs packages listed in the requirements.txt file.

Why this answer

Define custom Python dependencies in the 'requirements.txt' file in the environment's bucket for Composer to install.

13
Multi-Selecthard

Which THREE of the following are valid methods for troubleshooting failed tasks in Cloud Composer?

Select 3 answers
A.Checking the Airflow web UI task state
B.Rebuilding the entire GKE cluster
C.Deleting the environment bucket
D.Examining scheduler logs
E.Reviewing task instance logs
AnswersA, D, E

Identifies the point of failure.

Why this answer

Reviewing logs, checking task instance states in the UI, and examining scheduler logs are all standard troubleshooting steps.

14
MCQmedium

You are orchestrating a pipeline with Workflows that invokes several Cloud Functions. You need to pass the output of one function as an argument to the next. What is the correct syntax?

A.Use global environment variables to store intermediate state.
B.Assign the call result to a variable and reference it in the next step.
C.Combine all function calls into a single synchronous block.
D.Write the output to a temporary GCS file and read it back.
AnswerB

Workflows allows assigning results to variables for use in subsequent steps.

Why this answer

In Workflows, you capture the output of a call and pass it as an input variable to the next step using the assignment operator.

15
Multi-Selecthard

Which THREE of the following Cloud Composer 2 features provide improved performance over Composer 1?

Select 3 answers
A.Unified environment management
B.Requires manual GKE cluster management
C.Fixed pricing model
D.Configurable resource allocation
E.Environment auto-scaling
AnswersA, D, E

Integrated UI and configuration management.

Why this answer

Composer 2 offers auto-scaling, custom resource allocation, and environment-level configuration management.

16
Multi-Selecteasy

Which TWO of the following are valid ways to trigger a Cloud Composer DAG?

Select 2 answers
A.Sending an email to the Airflow scheduler.
B.Clicking 'Run' in the Cloud Composer console environment list.
C.Airflow Web UI
D.Directly editing the DAG file in the bucket.
E.Airflow CLI
AnswersC, E

The 'Trigger DAG' button is a primary method.

Why this answer

DAGs can be triggered by a timer (schedule) or manually through the Airflow Web UI/CLI.

17
MCQeasy

Which Cloud Composer metric should you monitor to identify if your Airflow scheduler is struggling to parse your DAGs in a timely manner?

A.airflow_task_execution_time
B.dag_run_success_count
C.dag_processing_total_parse_time
D.scheduler_heartbeat
AnswerC

This metric tracks DAG parsing performance.

Why this answer

The 'dag_processing_total_parse_time' metric specifically tracks the time taken to process and parse DAG files.

18
MCQeasy

You are deploying a Cloud Composer 2 environment and need to ensure that the DAG files are automatically synchronized to all workers. Where should you store these files?

A.Inside a Docker volume configured in the environment's YAML manifest.
B.In the local /home/airflow/gcs/dags directory of each worker node.
C.In the 'dags/' folder of the environment's bucket.
D.In a custom persistent disk attached to the Airflow scheduler.
AnswerC

The bucket associated with the environment is the designated location for DAG files.

Why this answer

Cloud Composer 2 automatically synchronizes DAGs stored in the 'dags/' folder of the associated Cloud Storage bucket to all environment components.

19
Multi-Selectmedium

Which THREE of the following are valid Airflow connection types in Cloud Composer?

Select 3 answers
A.HTTP
B.Kubernetes Pod
C.Python
D.Google Cloud
E.Postgres
AnswersA, D, E

Used for API calls.

Why this answer

Airflow supports connections to many systems, including Google Cloud, HTTP, and SQL databases.

20
MCQhard

A Cloud Composer DAG is failing because the Airflow database is locking up during high-concurrency periods. What is the most effective way to address this?

A.Delete all past DAG run logs.
B.Increase the number of DAGs in the repository.
C.Scale up the Cloud Composer environment size to increase database resources.
D.Set the 'parallelism' parameter to a very high value.
AnswerC

Composer environment sizes (e.g., small to medium) include higher-tier database resources.

Why this answer

Scaling the Composer environment or adjusting the database performance settings (or Airflow configuration) is the recommended path to resolve lock contention.

21
MCQmedium

You are troubleshooting a stuck task in Cloud Composer. You want to see the stdout/stderr logs for that specific task attempt. Where can you find them?

A.In the 'logs/' folder in the environment's GCS bucket.
B.In the Airflow metadata database directly.
C.In the Cloud Composer environment console logs.
D.Via the 'kubectl' logs command on the worker pod.
AnswerA

Composer writes all task execution logs to the GCS bucket.

Why this answer

Airflow task logs are stored in the GCS bucket associated with the environment, organized by DAG and task name.

22
MCQmedium

You have a Workflow that must wait for a specific time duration before proceeding. Which step type is most appropriate?

A.pause_execution
B.wait_for_condition
C.sys.sleep
D.delay_step
AnswerC

sys.sleep pauses the workflow execution for a set time.

Why this answer

The 'sys.sleep' function in Workflows allows pausing the execution for a defined duration.

23
MCQeasy

Which property in a Workflows YAML definition is required to define the entry point of the workflow?

A.main
B.entry_point
C.init
D.start
AnswerA

Every workflow must have a 'main' block.

Why this answer

The 'main' step is the required starting point for any workflow execution.

24
MCQeasy

Which component of Cloud Composer acts as the primary interface for managing and triggering DAGs manually?

A.Cloud Storage Browser
B.Airflow Web Interface
C.Cloud Shell
D.BigQuery Console
AnswerB

The web UI provides the DAG management dashboard.

Why this answer

The Airflow Web Interface is the primary UI for managing DAGs and viewing execution history.

25
MCQhard

In a Cloud Composer DAG, you need to trigger a BigQuery job that runs as a service account other than the one assigned to the GKE nodes. How should you implement this?

A.Hardcode the credentials in a JSON file inside the DAG folder.
B.Use the 'impersonation_chain' parameter in the BigQueryInsertJobOperator.
C.Change the worker node's identity in the Cloud Console.
D.Configure a connection with the 'Service Account Key' type in Airflow UI.
AnswerB

This is the secure way to perform service account impersonation in Airflow operators.

Why this answer

Using the 'impersonation_chain' parameter in the BigQueryInsertJobOperator allows the service account running the task to impersonate a different service account.

26
MCQmedium

Your organization uses Workflows to orchestrate multi-step API calls. You need to handle transient failures in a specific HTTP request by retrying it up to 5 times with exponential backoff. Which block should you use?

A.A 'loop' block with a counter increment.
B.An 'if' statement checking for 500 status codes.
C.A global 'exception' handler at the end of the workflow.
D.A 'try' block with a 'retry' policy.
AnswerD

The retry block handles exceptions and allows defining custom parameters like max_retries and backoff.

Why this answer

The 'try/retry' block in Workflows syntax allows for configuring custom backoff and max attempts for specific steps.

27
MCQhard

You want to dynamically generate tasks in an Airflow DAG based on the number of files in a GCS bucket. What is the standard way to do this?

A.Use the 'SubDagOperator'.
B.Configure an external metadata service to inject tasks.
C.Use the 'DynamicTaskGroup' operator in the Airflow library.
D.Use a Python loop inside the DAG file to instantiate tasks.
AnswerD

Dynamic task generation is achieved by looping in the DAG module.

Why this answer

Use a Python loop within the DAG file to iterate over the list of files (often using the GCS hook) and create Task instances dynamically.

28
Multi-Selecteasy

Which THREE of the following are common steps in a typical data pipeline orchestration pattern?

Select 3 answers
A.Validation
B.Network cable installation
C.Data ingestion
D.Transformation
E.Hardware provisioning
AnswersA, C, D

Ensuring data quality.

Why this answer

Common steps include data ingestion, transformation, and validation/export.

29
Multi-Selecthard

Which TWO of the following are common reasons a Workflows execution might stay in a 'PENDING' or 'FAILED' state?

Select 2 answers
A.Invalid YAML syntax
B.Airflow scheduler failure
C.Insufficient IAM permissions
D.Database locks
E.Worker node exhaustion
AnswersA, C

Syntax errors prevent successful deployment/execution.

Why this answer

Common issues include invalid IAM permissions or malformed YAML syntax in the workflow definition.

30
MCQeasy

Which command-line tool do you primarily use to deploy and manage Workflows?

A.gsutil
B.kubectl
C.gcloud
D.bq
AnswerC

gcloud workflows is the CLI command set for this service.

Why this answer

The 'gcloud' CLI is the standard tool for managing Google Cloud services, including Workflows.

31
MCQhard

You need to run a Workflows execution based on a schedule. Which Google Cloud service is designed to manage this triggering?

A.Eventarc
B.Cloud Tasks
C.Cloud Scheduler
D.Pub/Sub
AnswerC

Cloud Scheduler is the standard service for recurring triggers.

Why this answer

Cloud Scheduler is the fully managed service for scheduling jobs, including triggers for Workflows.

32
MCQhard

Your team needs to audit all modifications made to DAG files in the GCS bucket used by Cloud Composer. What is the most efficient way to achieve this?

A.Enable Data Access audit logs on the GCS bucket.
B.Enable 'Version History' in the Airflow UI.
C.Use Cloud Monitoring to alert on 'gcs_object_write' events.
D.Write a custom DAG to scan the bucket every minute.
AnswerA

Audit logs track all mutations to objects in GCS.

Why this answer

Enable Cloud Audit Logs (Data Access logs) on the GCS bucket to track all API calls including object modifications.

33
MCQeasy

When configuring a Workflows execution, you want to ensure the workflow can be triggered by an HTTP POST request. Which feature allows this?

A.Executing the workflow via the REST API.
B.Configuring a Cloud Scheduler job with an HTTP target.
C.Enabling the 'HTTP Gateway' on the workflow itself.
D.Creating a Service Account with 'Public Access'.
AnswerA

The Workflows API endpoint accepts POST requests to trigger executions.

Why this answer

Workflows can be triggered via HTTP POST requests to the workflow execution API endpoint.

34
MCQeasy

When using Cloud Scheduler to trigger a Workflows execution, what is the best practice for authenticating the scheduler to the Workflows API?

A.Use an API Key generated in the console.
B.Hardcode credentials in the scheduler job.
C.Use 'Public' access for the workflow.
D.Use an OIDC token with a service account.
AnswerD

OIDC provides secure authentication for Google Cloud API calls.

Why this answer

Using an OIDC token with a service account that has the 'Workflows Invoker' role is the secure, recommended method.

35
Multi-Selecthard

Which TWO of the following strategies help reduce Cloud Composer costs?

Select 2 answers
A.Keep all historical logs forever
B.Use the largest environment size
C.Delete unused environments
D.Increase scheduler frequency
E.Enable auto-scaling
AnswersC, E

Stops ongoing costs.

Why this answer

Stopping unused environments and using environment auto-scaling are effective cost-saving measures.

36
MCQmedium

You need to run a task in Cloud Composer only if the previous task failed. Which Trigger Rule should you use?

A.none_failed
B.always
C.all_success
D.one_failed
AnswerD

This trigger rule executes if any parent task failed.

Why this answer

The 'one_failed' trigger rule allows a task to execute if at least one parent task has failed.

Ready to test yourself?

Try a timed practice session using only Data Pipeline Orchestration questions.