Skip to content


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.


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


  • 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 ""
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 ""
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"


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