Gluesync ODBC driver
The Gluesync ODBC driver lets any ODBC client query Query Forge, the federated SQL endpoint of Core Hub. Excel, Power BI, Tableau, Qlik, pyodbc, R and isql connect with nothing else installed: no JVM and no JDBC-ODBC bridge. It is the ODBC counterpart of the Gluesync JDBC driver, and it talks to Query Forge directly.
Before you start
-
A Core Hub with Query Forge reachable from the machine that runs the client (default port
8765), or a Gluesync Connect relay URL. -
A Personal API Token with the
gluesync.jdbc_gatewayscope. See Authentication.
Supported platforms
| Platform | Driver manager |
|---|---|
Windows x86_64 (64-bit only) |
The Windows ODBC Driver Manager. Use the 64-bit ODBC Data Sources tool. |
Linux x86_64 and aarch64 |
unixODBC |
macOS |
unixODBC from Homebrew. There is no prebuilt macOS archive yet: build the driver from source. |
iODBC is not supported in the first version: its wide-character type is 32-bit, while the driver uses 16-bit wide characters like Windows and unixODBC. With iODBC only the ANSI entry points work.
Download
| Platform | Archive |
|---|---|
Windows x86_64 |
|
Linux x86_64 |
|
Linux aarch64 |
Every release is also published as gluesync-odbc-<version>-<platform>.<extension> in the same folder. What changed in each version is in the ODBC driver changelog.
Install on Windows
-
Unzip the archive.
-
Open an elevated PowerShell in the unzipped folder and run:
.\scripts\install-windows.ps1The script registers the driver as Gluesync ODBC Driver under
HKLM:\SOFTWARE\ODBC\ODBCINST.INI. Running it again is safe.
To create a user DSN at the same time:
.\scripts\install-windows.ps1 -DsnName GluesyncProd -Server corehub.example.com -Port 8765
Pass -DriverPath C:\path\to\gluesync_odbc.dll to register a DLL kept somewhere else. .\scripts\install-windows.ps1 -Uninstall removes the registration; add -DsnName to remove that DSN too.
Create a DSN in the ODBC Data Source Administrator
-
Open ODBC Data Sources (64-bit).
-
Pick the User DSN or System DSN tab and choose Add, or Configure on an existing DSN.
-
Select Gluesync ODBC Driver. The driver’s own dialog opens.
| Field | Notes |
|---|---|
Data source name |
Required. |
Description |
Optional. |
Server |
The Core Hub host. Leave it empty when the DSN already has a |
Port |
The Query Forge port. Default |
Token |
Optional. Your Personal API Token ( |
Trust server certificate |
Stores |
Other keys, such as Url, UID or FetchSize, are kept when you reconfigure a DSN. Add them with Add-OdbcDsn -SetPropertyValue. Excel, Power BI and the other tools that open the same dialog from their own connection screens use it too.
When an application connects with a window and asks the driver to prompt, and the server or the token is missing, the same dialog opens without the name fields. Cancel ends the attempt without an error. On Linux and macOS the driver never opens a dialog: missing keys make the connection fail with a diagnostic.
Install on Linux
Install unixODBC (apt install unixodbc or dnf install unixODBC), unpack the archive and run:
./scripts/install-unixodbc.sh
To create a user DSN at the same time:
./scripts/install-unixodbc.sh --dsn GluesyncProd --server corehub.example.com --port 8765
The script registers libgluesync_odbc.so with odbcinst as Gluesync ODBC Driver. Pass --driver /path/to/libgluesync_odbc.so if the library lives elsewhere. Running it again is safe: the driver and the DSN are replaced by name.
On macOS, install unixODBC with brew install unixodbc, then run the same script with the library you built, for example ./scripts/install-unixodbc.sh --driver "$PWD/target/release/libgluesync_odbc.dylib".
Connect
Connection string
Driver={Gluesync ODBC Driver};Server=corehub.example.com;Port=8765;UID=__token__;PWD=gsp_...
Or use a DSN: DSN=GluesyncProd;PWD=gsp_…. Keys are case-insensitive. A key in the connection string wins over the same key in the DSN.
Connection keys
| Key | Meaning | Default |
|---|---|---|
|
The Core Hub host. |
Required unless |
|
The Query Forge port. |
|
|
The full gateway URL, for example a Gluesync Connect relay |
|
|
The Core Hub user name. It only identifies you in the audit log; the token grants access. |
|
|
Your Personal API Token ( |
None |
|
The same as |
None |
|
A Gluesync Connect relay token ( |
None |
|
The scan cap for the connection. See Scan cap. |
Server default |
|
The statement timeout, in seconds. |
Server default |
|
Milliseconds the driver waits for one response. |
600000, or |
|
Rows per frame. |
|
|
|
|
|
The driver trace file and its level: |
Off |
A Url that is not on localhost, 127.0.0.1 or ::1 must use https. A Url with user information, a query string or a fragment is refused.
Authentication
Query Forge accepts only Personal API Tokens (gsp_…). Password login is refused with SQLState 28000, and so is an expired or revoked token. Create a token in the Control Plane under JDBC > New token, or under Account > Personal API Tokens, and give it the gluesync.jdbc_gateway scope. See Personal API Tokens and scopes.
Pass the token in either of two ways:
-
UID=<anything>andPWD=gsp_…. This suits tools that show a user name and a password field, such as Excel and Power BI. -
The single-field form
Token=gsp_….
You query as yourself: the connection shows only the agents your token can reach.
Query from a client
pyodbc
import os
import pyodbc
conn = pyodbc.connect(
"Driver={Gluesync ODBC Driver};Server=corehub.example.com;Port=8765;"
f"UID=__token__;PWD={os.environ['GLUESYNC_PAT']}"
)
for row in conn.execute("SELECT * FROM crm.customers"):
print(row)
BI tools
Excel, Power BI and Tableau use their generic ODBC connection.
- Power BI Desktop
-
Choose Get Data > ODBC and pick the DSN. In the credentials dialog choose Database: any user name, and your Personal API Token as the password. Pick tables, or write a SQL statement under Advanced options.
- Excel
-
Choose Data > Get Data > From Other Sources > From ODBC, pick the DSN, choose Database credentials with the same user name and password, then select a table or enter a SQL statement.
- Tableau
-
Connect with the Other Databases (ODBC) connector, choose the DSN or the connection string, then use the token as the password.
Keep queries cheap for these tools: Query Forge runs as much of each statement as it can on the source database. See Write fast queries from BI tools.
What you query
Query Forge exposes the SQL-capable agents you can reach as catalogs and schemas, with the tables behind them. Write names the way Query Forge shows them, quoting an identifier with " when it needs it, for example "<catalog>".schema.table. See Writing federated SQL for the naming rules; they are the same as for the JDBC driver.
SQL clients show the driver with its version, and the server as Gluesync Query Forge with the Core Hub version (unknown with a Core Hub that does not report it).
Limits
-
The data source is read-only. Committing a transaction succeeds and does nothing.
-
Cursors are forward-only: fetching supports
SQL_FETCH_NEXTonly. -
Input parameters work one parameter set at a time. Data-at-execution parameters, explicit descriptors and
SQLBrowseConnectare not supported. -
The catalog functions for primary keys, foreign keys, statistics, special columns, procedures and privileges return empty result sets.
-
64-bit only on Windows; iODBC is not supported.
Errors
The driver reports Query Forge’s SQLState in the ODBC diagnostic.
| SQLState | Meaning | What to do |
|---|---|---|
|
The token is missing, expired, revoked or not a Personal API Token. |
Create a token with the |
|
The table or schema does not exist, or your token cannot see it. |
Check the name and the agents your token may use. |
|
The driver waited longer than |
Raise |
|
The query needed more rows from one table than the scan cap allows. |
Let the source do more of the work, or raise |
Connection failures report 08001 while connecting and 08S01 afterwards. Other SQLStates are the ones listed in Troubleshooting.
Driver updates
The ODBC driver has its own version, separate from Core Hub. From Gluesync 2.3.3.0, when Core Hub can reach the Gluesync catalog and you have a Query Forge token, the Query Forge setup screen and toolbar in the Gluesync UI tell you when a newer driver is out, and what changed in it, the same way as for the JDBC driver. Open the notice to download the new version, then choose Mark as updated to hide it until the next release. See Driver versions and updates.
Troubleshooting
To record what the driver does, add LogFile and LogLevel to the connection string or the DSN:
Driver={Gluesync ODBC Driver};Server=corehub.example.com;LogFile=C:\Temp\gluesync-odbc.log;LogLevel=debug;UID=__token__;PWD=gsp_...
Use debug or trace only while you investigate: the file grows quickly. Common causes of a failed connection:
-
Driver not found: the driver is not registered. Run the install script again, and on Windows use the 64-bit ODBC tool and a 64-bit client.
-
The connection fails with a diagnostic about missing keys: set
ServerorUrl, and a token. -
28000: see Authentication. -
Certificate errors on
https: install the CA that signed Core Hub’s certificate, or setTrustServerCertificate=1for a test environment only.