ODBC in DATTAX (Linux)
Not every data source has a JDBC driver — legacy systems, older ERPs and niche databases often publish only an ODBC driver. Instead of leaving that data out, DATTAX includes a generic ODBC (genérico) connector that talks to any native Linux ODBC driver: you point at the driver, write the SQL query and the data enters the same pipeline as every other source.
Under the hood, DATTAX uses the isql client from unixODBC, already installed in the eclipse-temurin-datta base image. That choice avoids depending on the built-in JDBC-ODBC bridge (removed as of JDK 8) and works with any native Linux ODBC driver.
Drivers included out of the box
The platform ships with two ODBC drivers ready to use:
| Driver | Package | Library |
|---|---|---|
| PostgreSQL Unicode | psqlodbc | /usr/lib/psqlodbcw.so |
| MariaDB Connector/ODBC | mariadb-connector-odbc | /usr/lib/libmaodbc.so |
Both are already registered in the /etc/odbcinst.ini file, under the [PostgreSQL Unicode] and [MariaDB] entries — no preparation needed.
Drivers from other vendors
For Oracle, SQL Server, Db2 and other databases with a proprietary ODBC driver, installation is handled by the platform operations team. There are two steps:
- Make the driver library available — the native Linux
.sofile downloaded from the vendor's official site, mounted on a read-only volume in the DATTAX environment (100 MiB is usually enough). - Register the driver — one
.inifile per vendor at/etc/odbcinst.d/<vendor>.ini, with the registration name (the one you will later use in the connection-string) and the path to the library.
Example registration for Microsoft SQL Server (msodbcsql18):
[ODBC Driver 18 for SQL Server]
Description=Microsoft ODBC Driver 18 for SQL Server
Driver=/opt/microsoft/msodbcsql18/lib64/libmsodbcsql-18.4.so.1.1
UsageCount=1From then on the driver is visible to all pipelines.
How to register an ODBC connection
In the DATTAX Pipeline Designer ( or directly on the canvas):
- Drag ODBC (genérico) from the source palette onto the canvas.
- Choose the connection mode:
- DSN — the name of a source already declared in
/etc/odbc.iniby the operations team; or - Connection-string — the full DSN-less string, for example:
- DSN — the name of a source already declared in
Driver={PostgreSQL Unicode};Server=db.empresa.com;Port=5432;Database=prod;Uid=datta;Pwd=...- Provide the SQL Query that extracts the data.
- Use the preview to check the result and run the pipeline.
Limitations
- The
isqloutput is formatted text — original types are not preserved (everything becomes a string). Use the TypeConvert transform in the pipeline to infer integers, dates and decimals when needed. - Values with an embedded pipe character (
|) can confuse parsing. Handle it in the query itself (for example, withREPLACE(coluna, '|', '_')) — switching the delimiter to TAB in the ODBC connector configuration is planned for the next release. - Latency is higher than with a direct JDBC driver. For large sources, prefer the vendor's JDBC driver through
JdbcSource— see the driver catalog — and keep ODBC for sources that have no alternative.
When something does not work
Diagnosis uses unixODBC's own utilities, run in the Pipeline Designer environment from the platform console:
# Check that isql finds the DSN
isql -v "MeuDSN"
# List installed drivers
odbcinst -q -d
# List configured DSNs
odbcinst -q -sCommon errors:
| Error | Cause | What to do |
|---|---|---|
IM002 ... not found | The given DSN does not exist in odbc.ini | Check the name or ask the operations team to register it |
IM003 ... could not load driver | The driver library is not on the expected path | Ask the operations team to mount/verify the driver library |
S1090 invalid string or buffer length | Driver incompatible with unixODBC 2.3+ | Request a newer driver version from the vendor |
08001 unable to connect | Network or firewall blocking access to the source | Check host, port and the network access (allowed IP range) to the source |