This guide explains how to configure the SQL connector for Nexalis Agent on Linux and Windows. The SQL connector reads data from SQL databases through ODBC and forwards messages toDocumentation Index
Fetch the complete documentation index at: https://docs.nexalis.io/llms.txt
Use this file to discover all available pages before exploring further.
gRPC_kafka.
1. What the connector needs
To use the SQL connector you need:- A SQL database reachable from the machine running Nexalis Agent.
- An ODBC driver installed for that database.
- A SQL connector configuration file.
- Nexalis Agent launcher configured to start the connector.
timeseries: table rows converted into one or more time series datapoints.events: table rows converted into event messages.
2. Configuration file structure
A SQL connector config file contains:driver: ODBC connection parameters.deviceModel: value sent in Nexalis messages.dbTimeZone: default timezone for timestamps if a table does not define its owntimeZone.dbLocale: default locale for timestamp parsing if a table does not define its ownlocale.pollPeriod: polling interval in seconds.backFillPeriod: interval in seconds for retrying missed data.ambiguousBackFillPeriod: retry interval in seconds for ambiguous timestamps such as DST overlaps.chunkLimit: maximum number of rows read in one polling pass.timeseries: list of time series table mappings.events: list of event table mappings.
3. Linux driver examples
These are the Linux driver libraries used by the repository templates and tests.SQLite
PostgreSQL
MariaDB / MySQL
SQL Server
${{ drivers }}is resolved by the connector to the SQL driver directory.${{ NAME }}placeholders are replaced from environment variables visible to the connector.- On Linux, the connector uses the ODBC manager installed for the agent environment.
4. Windows configuration examples
On Windows, the connector uses the system ODBC stack. The JSON format is the same. The simplest approach on Windows is usually to configure a DSN in ODBC Data Source Administrator and reference it in the connector config.Windows example using a DSN
Windows example using direct connection fields
5. Time series configuration example
Example for reading one table as time series data:tables: source table names.timestampColumn: column containing the timestamp.timestampFormat: format used when timestamps are stored as text.timeZone: timezone used to interpret the timestamp.period: label kept in the config for the dataset.columns: output datapoints.meta: extra columns attached as metadata to the datapoint.
6. Event configuration example
Example for reading one table as events:dataPointColumns: columns combined to create the datapoint name.dataPointSuffix: suffix appended to the datapoint name.descriptionColumns: columns combined into the message description.valueColumn: one or more columns used as the event value.
7. Timezone and timestamp handling
The connector must know which timezone to use when it converts database timestamps into the Unix timestamp sent to Nexalis Cloud.How timezone selection works
The connector uses timezone settings in this order:- If
settings.timeZoneis defined for atimeseriesoreventstable, that timezone is used for that table. - If the table does not define
timeZone, the connector usesdbTimeZone. - If neither is set, use
UTC.
- Use
UTCif the database already stores timestamps in UTC. - Use the real plant timezone if the database stores local wall-clock time.
What timestampFormat does
Use timestampFormat when the timestamp column is stored as text. Typical examples:
%F %Tfor values like2026-04-03 14:30:00%m/%d/%Y %Tfor values like04/03/2026 14:30:00
Example A: timestamps stored as UTC text
Example B: timestamps stored in plant local time
Example C: table uses the default timezone from the config
timeZone, so Europe/Paris is used from dbTimeZone.
Timestamp ambiguity during DST
Ambiguity happens when local time is repeated during the fall DST change. Example inAmerica/Chicago:
2026-11-01 01:30:00happens twice.- One occurrence is before the DST switch.
- The second occurrence is after the DST switch.
- If the timestamp is unambiguous, it sends the row normally.
- If the timestamp is ambiguous, it may delay that row instead of sending a wrong time.
- The row is retried later using
ambiguousBackFillPeriod. - Once the ambiguity can be resolved from later rows, the connector sends the data with the corrected timestamp.
- Best option: store timestamps in UTC.
- If you must store local time, set the correct
timeZone. - Around DST transitions, avoid timestamp text that has no timezone or offset if your source system can provide UTC instead.
Example D: local timestamps with DST-sensitive timezone
8. Running through the launcher
The SQL connector is started by the Nexalis Agent launcher. It should not be run directly for normal operation. What you configure for the launcher:- the SQL connector JSON file
- the site name and device ID used by the agent
- the
gRPC_kafkaservice used by the agent - the required database environment variables
- Install the SQL ODBC driver on the machine.
- Place the SQL connector JSON configuration file in the agent configuration set.
- Set the required environment variables used in the
driversection. - Start Nexalis Agent through its normal launcher process.
- the ODBC driver library exists on disk
- the database host is reachable
- the required environment variables are available to the launcher process
- the required ODBC driver or DSN is installed
- the SQL connector configuration points to the correct driver or DSN
- the SQL database is reachable from the Windows host
- the required environment variables, if used, are available to the launcher process
9. Optional local records storage
The connector keeps offsets and retry information in a local records database. If you do not definelocalRecords, the connector uses a local SQLite file by default.
Example explicit configuration:
10. Recommended first test
For a first validation:- Configure one table only.
- Use a short
pollPeriod, for example1second. - Set
dbTimeZoneandtimestampFormatcarefully. - Start Nexalis Agent through the launcher.
- Confirm that values appear in Nexalis Cloud with the expected timestamps.
timestampFormattimeZonedbTimeZone- whether the database stores UTC or local time