daniel_antwi
01/09/2023, 7:57 PMsqlalchemy.exc.InterfaceError: (pyodbc.InterfaceError) ('IM002', '[IM002] [unixODBC][Driver Manager]Data source name not found and no default driver specified (0) (SQLDriverConnect)')
(Background on this error at: <https://sqlalche.me/e/14/rvf5>)
BuzzCutNorman
01/09/2023, 8:08 PMconfig:
dialect: mssql
driver_type: pyodbc
host: <yourserver>
port: 1433
user: <username>
database: <database>
sqlalchemy_eng_params:
fast_executemany: 'True'
sqlalchemy_url_query:
driver: ODBC Driver 18 for SQL Server
TrustServerCertificate: yes
daniel_antwi
01/09/2023, 8:11 PMBuzzCutNorman
01/09/2023, 8:19 PMMicrosoft ODBC Driver for SQL Server
installed. You need the config line of driver: ODBC Driver <NN> for SQL Server
to match the installed version. You can change out <NN> for the version number of the driver. If you need the installation instruction they are here: Install the Microsoft ODBC driver for SQL Server (Linux)christoph
01/09/2023, 8:40 PMpymssql
(which uses FreeTDS instead of Microsoft's proprietary blobs) as the alternative driver option.daniel_antwi
01/09/2023, 9:06 PMdaniel_antwi
01/09/2023, 9:06 PMchristoph
01/09/2023, 9:12 PMModuleNotFoundError: No module named 'pymssql'Yup. I just saw that. The
pymssql
support as an alternate driver does require you to manually add the required Python package into your meltano.yml
definition. I'm actually not quite sure if we can use extras
in meltano (i.e. if we could use pip_url: tap-mssql[pymssql]
in meltano.yml)daniel_antwi
01/09/2023, 9:17 PMchristoph
01/09/2023, 9:20 PMpymssql
driver fully available in your meltano project, you will need to edit your meltano.yml
and adjust this line:
pip_url: git+<https://github.com/BuzzCutNorman/tap-mssql.git>
And change it to this:
pip_url: git+<https://github.com/BuzzCutNorman/tap-mssql.git> pymssql
And then run meltano install --clean
You also need to make sure that you have the FreeTDS
library packages for your OS installed (e.g. apt-get install freetds-dev
in Ubuntu)daniel_antwi
01/10/2023, 3:25 PMchristoph
01/10/2023, 8:28 PMFreeTDS
library now no longer needs to be pre-installed into your OS.
The binary wheels for pymssql
are now built for many different platforms and include the correct copies of latest versions of the native library for FreeTDS in the binary wheel on PyPIdaniel_antwi
01/10/2023, 8:29 PM