Skip to content

SX-IO — SQL Connector

The SX-IO SQL Connector allows the SMX-RNS20 to write time-series data directly to a remote SQL database. Each collected data point (value + timestamp) is inserted as a row, enabling factory analytics using standard SQL tools without a separate IoT middleware layer.

Supported database engines: MySQL / MariaDB, Microsoft SQL Server, PostgreSQL.

Create a table to receive the data. Minimum required schema:

CREATE TABLE machine_data (
id BIGINT AUTO_INCREMENT PRIMARY KEY,
device_id VARCHAR(64),
tag_name VARCHAR(128),
tag_value DOUBLE,
recorded_at DATETIME DEFAULT CURRENT_TIMESTAMP
);

Create a dedicated database user with INSERT permission only on this table for better security.

  1. Ensure the database server is accessible from the SMX-RNS20 (either on the same LAN or reachable via the WAN IP/hostname).
  2. Log in to the SMX-RNS20 web interface → SX-IO → Outputs → SQL Connector.
  3. Enter the database host, port, database name, username, and password.
  4. Select the table name and map the column names to: timestamp, device ID, tag name, and value.
  5. Choose which SX-IO data points to write to SQL and set the write interval or enable on-change writes.
  6. Enable local buffering to cache rows during connectivity loss — the SMX will flush the buffer when the connection is restored.
  7. Save and check the database to verify rows are being inserted.

SX-IO — Modules → SQL Connector Step 1 — Modules → SQL Connector

SX-IO — Add new SQL connection Step 2 — Add new remote database connection

SX-IO — SQL connection settings: name, type, options Step 3 — Configure: Name, DB type (PostgreSQL/MySQL/MS_SQL), connection options

SX-IO — Test Connection button Step 4 — Test Connection to verify credentials

SX-IO — saving SQL connector Step 5 — Save the connector

SX-IO — SQL Insert Event list Step 6 — SQL Insert Event: add insertion rule

SX-IO — Insert Event: name, type (Cyclic/Acyclic), conditions Step 7 — Event details: name, type, condition, cycle interval

SX-IO — Insert Event: SQL connection, table, columns Step 8 — Configure SQL connection, table name, columns and buffer hours

SX-IO — saving Insert Event Step 9 — Save the Insert Event

SX-IO Status — SQL connector insert count and status Status page — connector name, insert count, messages and status

SX-IO Historian — SQL insert event records Historian → SQL Insert Events: timestamps, connection name, SQL string, success indicator