Skip to main content

Constants for the fields of the /create/tablemonitor request.

Option fields

options

Constants for options.

pub const DATASINK_NAME: &str = “datasink_name”;

Name of an existing data sink to send change data notifications to.

pub const DELETE: &str = “delete”;

Get notifications of delete operations. The deleted row count information is forwarded to the subscribers.

pub const DESTINATION: &str = “destination”;

Destination for the output data in format ‘destination_type://path[:port]’. Supported destination types are ‘http’, ‘https’ and ‘kafka’.

pub const EVENT: &str = “event”;

Type of modification event on the target table to be monitored by this table monitor.

pub const EXPRESSION: &str = “expression”;

Filter expression to limit records for notification.

pub const FAILED_NOTIFICATIONS_TABLE_NAME: &str = “failed_notifications_table_name”;

Name of a table to which failed stream notifications are written when the stream is suspended. The database will attempt to send notifications persisted in this table when the stream is resumed. The table has the following columns: rank (long), job_id (long), uuid (uuid), timestamp (timestamp), error_msg (string), payload (bytes). Leave this option empty to disable persisting failed notification events.

pub const INCREASING_COLUMN: &str = “increasing_column”;

Column on subscribed table that will increase for new records (e.g., TIMESTAMP).

pub const INSERT: &str = “insert”;

Get notifications of new record insertions. The new row images are forwarded to the subscribers.

pub const JOIN_COLUMN_NAMES: &str = “join_column_names”;

A comma-separated list of columns or expressions to include from the joined tables. Column references can use table names or aliases defined in ‘join_table_names’. Each column can optionally be aliased using ‘as’. The selected columns will also appear in the notification output.

pub const JOIN_EXPRESSIONS: &str = “join_expressions”;

Filter or join expressions to apply when combining the tables. Expressions are standard SQL-style conditions and can reference any table or alias listed in ‘join_table_names’. This corresponds to the WHERE clause of the underlying join, and can include conditions to filter the delta rows.

pub const JOIN_TABLE_NAMES: &str = “join_table_names”;

A comma-separated list of tables (optionally with aliases) to include in the join. The monitored table table_name must be included, representing only the newly inserted rows (deltas) since the last notification. Other tables can be any existing tables or views. Aliases can be used with the ‘table_name as alias’ syntax.

pub const KAFKA_TOPIC_NAME: &str = “kafka_topic_name”;

Name of the Kafka topic to publish to if destination in options is specified and is a Kafka broker.

pub const MAX_CONSECUTIVE_FAILURES: &str = “max_consecutive_failures”;

Maximum number of consecutive failed notification attempts before suspending the stream. A value of -1 (default) disables auto-suspend. This value is by rank and not overall.

pub const MONITOR_ID: &str = “monitor_id”;

ID to use for this monitor instead of a randomly generated one.

pub const ON_CHANGE: &str = “on_change”;

Report changes as they occur.

pub const PERIODIC: &str = “periodic”;

Report changes periodically at rate specified by refresh_period.

pub const REFRESH_METHOD: &str = “refresh_method”;

Method controlling when the table monitor reports changes to the table_name.

pub const REFRESH_PERIOD: &str = “refresh_period”;

When refresh_method is periodic, specifies the period in seconds at which changes are reported.

pub const REFRESH_START_TIME: &str = “refresh_start_time”;

When refresh_method is periodic, specifies the first time at which changes are reported. Value is a datetime string with format ‘YYYY-MM-DD HH:MM:SS’.

pub const UPDATE: &str = “update”;

Get notifications of update operations. The modified row count information is forwarded to the subscribers.