0
0
Apache Airflowdevops~10 mins

Azure operators in Apache Airflow - Interactive Code Practice

Choose your learning style9 modes available
Practice - 5 Tasks
Answer the questions below
1fill in blank
easy

Complete the code to import the Azure Blob Storage operator in Airflow.

Apache Airflow
from airflow.providers.microsoft.azure.operators.blob import [1]
Drag options to blanks, or click blank then click option'
AAzureBlobStorageOperator
BAzureBlobOperator
CAzureBlobStorageHook
DAzureBlobClient
Attempts:
3 left
💡 Hint
Common Mistakes
Using 'AzureBlobOperator' which does not exist.
Confusing operator with hook or client classes.
2fill in blank
medium

Complete the code to create an Azure Data Lake Storage operator with the correct task ID.

Apache Airflow
upload_task = AzureDataLakeStorageUploadOperator(task_id='[1]', ...)
Drag options to blanks, or click blank then click option'
Adelete_adls_file
Bdownload_from_adls
Cadls_list_files
Dupload_to_adls
Attempts:
3 left
💡 Hint
Common Mistakes
Using task IDs that describe downloading or deleting instead of uploading.
Using generic or unrelated task IDs.
3fill in blank
hard

Fix the error in the Azure Data Factory operator instantiation by completing the missing parameter.

Apache Airflow
adf_run = AzureDataFactoryRunPipelineOperator(pipeline_name='my_pipeline', [1]='my_resource_group', ...)
Drag options to blanks, or click blank then click option'
Aresource_group_name
BresourceGroup
Cresource_group
Dresourcegroupname
Attempts:
3 left
💡 Hint
Common Mistakes
Using camelCase or concatenated parameter names.
Misspelling the parameter name.
4fill in blank
hard

Fill both blanks to create a dictionary comprehension that filters Azure Blob Storage blobs with size greater than 1000.

Apache Airflow
filtered_blobs = {blob.name: blob.size for blob in blobs if blob.size [1] [2]
Drag options to blanks, or click blank then click option'
A>
B1000
C<
D500
Attempts:
3 left
💡 Hint
Common Mistakes
Using '<' instead of '>' causing wrong filtering.
Using wrong size value.
5fill in blank
hard

Fill all three blanks to create a dictionary comprehension that maps container names to blob counts where blob count is greater than 10.

Apache Airflow
container_blob_counts = {container.name: [1] for container, [2] in containers.items() if [3] > 10}
Drag options to blanks, or click blank then click option'
Ablob_count
Dcontainer_count
Attempts:
3 left
💡 Hint
Common Mistakes
Using different variable names causing errors.
Using unrelated variable names like container_count.