AzureCosmosDocumentSensor

Microsoft Azure

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

View Source

Last Updated: May. 7, 2021

Access Instructions

Install the Microsoft Azure provider package into your Airflow environment.

Import the module into your DAG file and instantiate it with your desired params.

Parameters

database_namestrTarget CosmosDB database_name.
collection_namestrTarget CosmosDB collection_name.
document_idThe ID of the target document.
azure_cosmos_conn_idstrReference to the Azure CosmosDB connection.
querystr

Documentation

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")

Was this page helpful?