This module contains sensor that check the existence of a table in a Cassandra cluster.

Module Contents

class airflow.providers.apache.cassandra.sensors.table.CassandraTableSensor(*, table: str, cassandra_conn_id: str, **kwargs)[source]

Bases: airflow.sensors.base.BaseSensorOperator

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

See also

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

For example, if you want to wait for a table called 't' to be created in a keyspace 'k', instantiate it as follows:

>>> cassandra_sensor = CassandraTableSensor(table="k.t",
...                                         cassandra_conn_id="cassandra_default",
...                                         task_id="cassandra_sensor")
  • table (str) -- Target Cassandra table. Use dot notation to target a specific keyspace.

  • cassandra_conn_id (str) -- The connection ID to use when connecting to Cassandra cluster

template_fields = ['table'][source]
poke(self, context: Dict[Any, Any])[source]

Was this entry helpful?