airflow.providers.alibaba.cloud.sensors.oss_key

Module Contents

Classes

OSSKeySensor

Waits for a key (a file-like instance on OSS) to be present in a OSS bucket.

class airflow.providers.alibaba.cloud.sensors.oss_key.OSSKeySensor(bucket_key, region, bucket_name=None, oss_conn_id='oss_default', **kwargs)[source]

Bases: airflow.sensors.base.BaseSensorOperator

Waits for a key (a file-like instance on OSS) to be present in a OSS bucket. OSS being a key/value it does not support folders. The path is just a key a resource.

Parameters
  • bucket_key (str) -- The key being waited on. Supports full oss:// style url or relative path from root level. When it's specified as a full oss:// url, please leave bucket_name as None.

  • region (str) -- OSS region

  • bucket_name (Optional[str]) -- OSS bucket name

  • oss_conn_id (Optional[str]) -- The Airflow connection used for OSS credentials.

template_fields :Sequence[str] = ['bucket_key', 'bucket_name'][source]
poke(self, context)[source]

Check if the object exists in the bucket to pull key. @param self - the object itself @param context - the context of the object @returns True if the object exists, False otherwise

get_hook(self)[source]

Create and return an OSSHook

Was this entry helpful?