airflow.providers.mongo.sensors.mongo
¶
Module Contents¶
Classes¶
Checks for the existence of a document which matches the given query in MongoDB. |
- class airflow.providers.mongo.sensors.mongo.MongoSensor(*, collection, query, mongo_conn_id='mongo_default', mongo_db=None, **kwargs)[source]¶
Bases:
airflow.sensors.base.BaseSensorOperator
Checks for the existence of a document which matches the given query in MongoDB.
mongo_sensor = MongoSensor( collection="coll", query={"key": "value"}, mongo_conn_id="mongo_default", mongo_db="admin", task_id="mongo_sensor", )
- Parameters
collection (str) – Target MongoDB collection.
query (dict) – The query to find the target document.
mongo_conn_id (str) – The Mongo connection id to use when connecting to MongoDB.
mongo_db – Target MongoDB name.
- template_fields: collections.abc.Sequence[str] = ('collection', 'query')[source]¶