A set of parameters for GPUdb::createTableMonitor. More…
#include <gpudb/protocol/create_table_monitor.h>
Public Member Functions | |
| CreateTableMonitorRequest () | |
| Constructs a CreateTableMonitorRequest object with default parameters. | |
| CreateTableMonitorRequest (const std::string &tableName_, const std::map< std::string, std::string > &options_) | |
| Constructs a CreateTableMonitorRequest object with the specified parameters. | |
Public Attributes | |
| std::string | tableName |
| Name of the table to monitor, in [ schema_name. ]table_name format, using standard name resolution rules. | |
| std::map< std::string, std::string > | options |
| Optional parameters. | |
Detailed Description
A set of parameters for GPUdb::createTableMonitor.
Creates a monitor that watches for a single table modification event type (insert, update, or delete) on a particular table (identified by tableName) and forwards event notifications to subscribers via ZMQ. After this call completes, subscribe to the returned topicId on the ZMQ table monitor port (default 9002). Each time an operation of the given type on the table completes, a multipart message is published for that topic; the first part contains only the topic ID, and each subsequent part contains one binary-encoded Avro object that corresponds to the event and can be decoded using typeSchema. The monitor will continue to run (regardless of whether or not there are any subscribers) until deactivated with GPUdb::clearTableMonitor.
For more information on table monitors, see Table Monitors.
Definition at line 36 of file create_table_monitor.h.
Constructor & Destructor Documentation
◆ CreateTableMonitorRequest() [1/2]
| inline |
Constructs a CreateTableMonitorRequest object with default parameters.
Definition at line 42 of file create_table_monitor.h.
◆ CreateTableMonitorRequest() [2/2]
| inline |
Constructs a CreateTableMonitorRequest object with the specified parameters.
| [in] | tableName_ | Name of the table to monitor, in [schema_name.]table_name format, using standard name resolution rules. |
| [in] | options_ | Optional parameters.
|
Definition at line 235 of file create_table_monitor.h.
Member Data Documentation
◆ options
| std::map<std::string, std::string> gpudb::CreateTableMonitorRequest::options |
Optional parameters.
- create_table_monitor_event: Type of modification event on the target table to be monitored by this table monitor. Supported values:
- create_table_monitor_insert: Get notifications of new record insertions. The new row images are forwarded to the subscribers.
- create_table_monitor_update: Get notifications of update operations. The modified row count information is forwarded to the subscribers.
- create_table_monitor_delete: Get notifications of delete operations. The deleted row count information is forwarded to the subscribers.
- create_table_monitor_monitor_id: ID to use for this monitor instead of a randomly generated one.
- create_table_monitor_datasink_name: Name of an existing data sink to send change data notifications to.
- create_table_monitor_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.
- create_table_monitor_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.
- create_table_monitor_destination: Destination for the output data in format ‘destination_type://path[:port]’. Supported destination types are ‘http’, ‘https’ and ‘kafka’.
- create_table_monitor_kafka_topic_name: Name of the Kafka topic to publish to if destination in options is specified and is a Kafka broker.
- create_table_monitor_increasing_column: Column on subscribed table that will increase for new records (e.g., TIMESTAMP).
- create_table_monitor_expression: Filter expression to limit records for notification.
- create_table_monitor_join_table_names: A comma-separated list of tables (optionally with aliases) to include in the join. The monitored table tableName 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.
- create_table_monitor_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.
- create_table_monitor_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.
- create_table_monitor_refresh_method: Method controlling when the table monitor reports changes to the tableName. Supported values:
- create_table_monitor_on_change: Report changes as they occur.
- create_table_monitor_periodic: Report changes periodically at rate specified by refresh_period.
- create_table_monitor_refresh_period: When refresh_method is periodic, specifies the period in seconds at which changes are reported.
- create_table_monitor_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’.
The default value is an empty map.
Definition at line 368 of file create_table_monitor.h.
◆ tableName
| std::string gpudb::CreateTableMonitorRequest::tableName |
Name of the table to monitor, in [ schema_name. ]table_name format, using standard name resolution rules.
Definition at line 247 of file create_table_monitor.h.
The documentation for this struct was generated from the following file:
- gpudb/protocol/create_table_monitor.h