CassandraRecordSensor

Apache Cassandra

Checks for the existence of a record in a Cassandra cluster.

View on GitHub

Last Updated: Oct. 23, 2022

Access Instructions

Install the Apache Cassandra provider package into your Airflow environment.

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

Parameters

tableRequiredTarget Cassandra table. Use dot notation to target a specific keyspace.
keysRequiredThe keys and their values to be monitored
cassandra_conn_idThe connection ID to use when connecting to Cassandra cluster

Documentation

Checks for the existence of a record in a Cassandra cluster.

See also

For more information on how to use this operator, take a look at the guide: Waiting for a Record to be created

For example, if you want to wait for a record that has values ‘v1’ and ‘v2’ for each primary keys ‘p1’ and ‘p2’ to be populated in keyspace ‘k’ and table ‘t’, instantiate it as follows:

>>> cassandra_sensor = CassandraRecordSensor(table="k.t",
... keys={"p1": "v1", "p2": "v2"},
... cassandra_conn_id="cassandra_default",
... task_id="cassandra_sensor")

Was this page helpful?