airflow.contrib.sensors.azure_cosmos_sensor

Module Contents

class airflow.contrib.sensors.azure_cosmos_sensor.AzureCosmosDocumentSensor(database_name, collection_name, document_id, azure_cosmos_conn_id='azure_cosmos_default', *args, **kwargs)[source]

Bases: airflow.sensors.base_sensor_operator.BaseSensorOperator

Checks for the existence of a document which matches the given query in CosmosDB. Example:

>>> azure_cosmos_sensor = AzureCosmosDocumentSensor(database_name="somedatabase_name",
...                            collection_name="somecollection_name",
...                            document_id="unique-doc-id",
...                            azure_cosmos_conn_id="azure_cosmos_default",
...                            task_id="azure_cosmos_sensor")
template_fields = ['database_name', 'collection_name', 'document_id'][source]
poke(self, context)[source]

Was this entry helpful?