Complete the airflow survey & get a free airflow 3 certification!

tests.system.google.cloud.gcs.example_gcs_sensor

Example Airflow DAG for Google Cloud Storage sensors.

Attributes

ENV_ID

PROJECT_ID

DAG_ID

RESOURCES_BUCKET_NAME

DESTINATION_BUCKET_NAME

FILE_NAME

UPLOAD_FILE_PATH

create_bucket

test_run

Functions

workaround_in_debug_executor(cls)

DebugExecutor change sensor mode from poke to reschedule. Some sensors don't work correctly

dummy_mode_property()

Module Contents

tests.system.google.cloud.gcs.example_gcs_sensor.ENV_ID[source]
tests.system.google.cloud.gcs.example_gcs_sensor.PROJECT_ID[source]
tests.system.google.cloud.gcs.example_gcs_sensor.DAG_ID = 'gcs_sensor'[source]
tests.system.google.cloud.gcs.example_gcs_sensor.RESOURCES_BUCKET_NAME = 'airflow-system-tests-resources'[source]
tests.system.google.cloud.gcs.example_gcs_sensor.DESTINATION_BUCKET_NAME = 'bucket_gcs_sensor_Uninferable'[source]
tests.system.google.cloud.gcs.example_gcs_sensor.FILE_NAME = 'example_upload.txt'[source]
tests.system.google.cloud.gcs.example_gcs_sensor.UPLOAD_FILE_PATH = 'gcs/example_upload.txt'[source]
tests.system.google.cloud.gcs.example_gcs_sensor.workaround_in_debug_executor(cls)[source]

DebugExecutor change sensor mode from poke to reschedule. Some sensors don’t work correctly in reschedule mode. They are decorated with poke_mode_only decorator to fail when mode is changed. This method creates dummy property to overwrite it and force poke method to always return True.

tests.system.google.cloud.gcs.example_gcs_sensor.dummy_mode_property()[source]
tests.system.google.cloud.gcs.example_gcs_sensor.create_bucket[source]
tests.system.google.cloud.gcs.example_gcs_sensor.test_run[source]

Was this entry helpful?