tests.system.google.cloud.gcs.example_gcs_to_gcs¶
Example Airflow DAG for Google Cloud Storage GCSSynchronizeBucketsOperator and GCSToGCSOperator operators.
Attributes¶
Functions¶
Task creates working directory. The logic behind this task is a workaround that provides sustainable |
Module Contents¶
- tests.system.google.cloud.gcs.example_gcs_to_gcs.BUCKET_NAME_SRC = 'bucket_gcs_to_gcs_Uninferable'[source]¶
- tests.system.google.cloud.gcs.example_gcs_to_gcs.BUCKET_NAME_DST = 'bucket_dst_gcs_to_gcs_Uninferable'[source]¶
- tests.system.google.cloud.gcs.example_gcs_to_gcs.PREFIX = '/home/airflow/gcs/data/gcs_to_gcs_Uninferable/'[source]¶
- tests.system.google.cloud.gcs.example_gcs_to_gcs.create_workdir()[source]¶
Task creates working directory. The logic behind this task is a workaround that provides sustainable execution in Composer environment: local files can be safely shared among tasks if they are located within ‘/home/airflow/gcs/data/’ folder which is mounted to GCS bucket under the hood (https://cloud.google.com/composer/docs/composer-2/cloud-storage). Otherwise, worker nodes don’t share local path and thus files created by one task aren’t guaranteed to be accessible be others.