Installing Third-Party Database Drivers
Some Tabsdata connectors depend on Python database drivers that Tabsdata cannot redistribute because of their licensing terms. These drivers are not included in the Tabsdata distribution, and are not installed by default.
If you use one of the affected connectors, you must install its driver explicitly as part of the Tabsdata installation. Doing so is a deliberate, one-time step: you choose the driver versions, and you accept the licence terms of the driver's publisher.
Which drivers do I need?
Install only the drivers for the connectors you actually use.
| Connector | Required package |
|---|---|
| MySQL, MySQL CDC, MariaDB | mysql-connector-python |
| PostgreSQL, PostgreSQL CDC | psycopg2-binary |
If you are not using any of these connectors, no action is required.
Declaring the drivers
In both installation flows you supply a plain
pip requirements file
listing the drivers and their versions. Pin exact versions (==) so that
installations are reproducible and so that an upgrade is always an explicit
decision:
mysql-connector-python==9.6.0
psycopg2-binary==2.9.11
Remove any line for a connector you do not use.
Quick start installation
-
Create the requirements file anywhere on the machine you are installing from. The quick start flow reads whatever path you give it, so the name is yours to choose; this page uses
requirements-td.txt, the name the EKS flow requires. -
Pass it to
quickstartwith--reqs-td:tdkserver quickstart --reqs-td ./requirements-td.txt
The drivers are installed into the instance's Python environment as part of the quick start.
EKS installation
For an EKS installation the requirements file lives inside the instance's init assets, under a fixed name.
-
Initialise the instance:
tdkserver init -
Edit the requirements file in the instance config directory.
initalways creates it, so the file is already there:~/.tabsdata/instances/<TABSDATA_INSTANCE>/init/assets/configs/requirements-td.txtReplace
<TABSDATA_INSTANCE>with your instance name. Add one driver specification per line, as shown in Declaring the drivers. -
Continue with the rest of the Tabsdata EKS setup instructions.
The drivers are baked into the function runner environment during setup, so they are available to connector functions at execution time.
Unlike the quick start flow, there is no command-line option here and the
location is fixed. Tabsdata always reads requirements-td.txt from the instance
configs directory; a file under any other name, or in any other directory, is
ignored.
Adding a driver to an existing installation
The requirements file is only read at installation time, so adding a driver means
re-running the installation. The instance's configs/ directory from the original
installation must still be intact. That is where the requirements file lives and
where the installation reads its configuration from.
-
Add the driver to
requirements-td.txtin the instance configs directory. -
Delete the installation:
tdkserver delete -
Re-create it:
tdkserver create
Until the driver is present in the environment that executes functions, any connector that needs it will fail at run time.
tdkserver delete does not erase user data or metadata. It tears down the
installation, not its contents.
A future version of Tabsdata will provide a dedicated command for updating function virtual environment requirements, making the delete/create cycle unnecessary.
Troubleshooting
A connector fails with a missing-module error. The driver for that connector
is not installed in the environment running the function. Confirm that the
package is listed in the requirements file, that the file was picked up by the
installation flow (correct --reqs-td path, or correct filename and directory
for EKS), and that the setup step has been re-run since the file changed.
The driver fails to build during installation. Prefer the binary
distributions named above (psycopg2-binary rather than psycopg2). If a build
is still attempted, the installation environment is missing the compiler or
client-library headers that the driver's source distribution needs.