airflow.providers.microsoft.azure.sensors.cosmos

Module Contents

Classes

AzureCosmosDocumentSensor

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

class airflow.providers.microsoft.azure.sensors.cosmos.AzureCosmosDocumentSensor(*, database_name, collection_name, document_id, azure_cosmos_conn_id='azure_cosmos_default', **kwargs)[source]

Bases: airflow.sensors.base.BaseSensorOperator

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

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",
)
Parameters
  • database_name (str) – Target CosmosDB database_name.

  • collection_name (str) – Target CosmosDB collection_name.

  • document_id (str) – The ID of the target document.

  • azure_cosmos_conn_id (str) – Reference to the Azure CosmosDB connection.

template_fields: Sequence[str] = ('database_name', 'collection_name', 'document_id')[source]
poke(context)[source]

Override when deriving this class.

Was this entry helpful?