Skip to content

CREATE CONNECTOR

Create a new connector for fetching data from or writing data to an external system. A connector can be either a source or a sink one. Note that source connector is not supported yet.

Synopsis

CREATE <SOURCE|SINK> CONNECTOR connector_name [IF NOT EXIST] WITH (connector_option [, ...]);

Notes

  • connector_name is a valid identifier.
  • There is an optional IF NOT EXIST configuration to create a connector only if the connector with the same name does not exist.
  • There is are some connector options in the WITH clause separated by commas. TYPE and STREAM are required to specify the type of a connector and which stream it fetches data from/writes data to. For details, see the following table.
TYPE Option Description Default Value
mysql host Host of MySQL server "127.0.0.1"
port Port of MySQL server 3306
username Username to login MySQL "root"
password Password to login MySQL "password"
database Database name to store data from HStreamDB "mysql"
clickhouse host Host of ClickHouse server "127.0.0.1"
port Port of ClickHouse server 9000
username Username to login ClickHouse "default"
password Password to login ClickHouse ""
database Database name to store data from HStreamDB "default"

Examples

CREATE SINK CONNECTOR mysql_conn WITH (TYPE = mysql, STREAM = foo, host = "127.0.0.1");
Back to top