PT EN
Back to site

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:

DriverPackageLibrary
PostgreSQL Unicodepsqlodbc/usr/lib/psqlodbcw.so
MariaDB Connector/ODBCmariadb-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:

  1. Make the driver library available — the native Linux .so file downloaded from the vendor's official site, mounted on a read-only volume in the DATTAX environment (100 MiB is usually enough).
  2. Register the driver — one .ini file 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):

ini
[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=1

From then on the driver is visible to all pipelines.

How to register an ODBC connection

In the DATTAX Pipeline Designer (SistemaConexões or directly on the canvas):

  1. Drag ODBC (genérico) from the source palette onto the canvas.
  2. Choose the connection mode:
    • DSN — the name of a source already declared in /etc/odbc.ini by the operations team; or
    • Connection-string — the full DSN-less string, for example:
     Driver={PostgreSQL Unicode};Server=db.empresa.com;Port=5432;Database=prod;Uid=datta;Pwd=...
  1. Provide the SQL Query that extracts the data.
  2. Use the preview to check the result and run the pipeline.

Limitations

  • The isql output 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, with REPLACE(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:

bash
# Check that isql finds the DSN
isql -v "MeuDSN"

# List installed drivers
odbcinst -q -d

# List configured DSNs
odbcinst -q -s

Common errors:

ErrorCauseWhat to do
IM002 ... not foundThe given DSN does not exist in odbc.iniCheck the name or ask the operations team to register it
IM003 ... could not load driverThe driver library is not on the expected pathAsk the operations team to mount/verify the driver library
S1090 invalid string or buffer lengthDriver incompatible with unixODBC 2.3+Request a newer driver version from the vendor
08001 unable to connectNetwork or firewall blocking access to the sourceCheck host, port and the network access (allowed IP range) to the source