Questions tagged [turbodbc]

Python DB-API module for working with ODBC data sources

https://turbodbc.readthedocs.io/en/latest/index.html

https://github.com/blue-yonder/turbodbc

16 questions
4
votes
3 answers

Python Turbodbc executemanycolumns error: Unable to cast Python instance to C++ type (compile in debug mode for details)

When attempting to use executemanycolumns with SQL Server, I get this error: "Unable to cast Python instance to C++ type (compile in debug mode for details) " I know that Turbodbc does not like numpy nulls (NaN or NaT) so to remove these I use: df=…
JacobocaJ
  • 41
  • 1
  • 3
2
votes
2 answers

ModuleNotFoundError: No module named 'turbodbc' on running the docker image

I'm using Cloudera Hive ODBC driver in my code and I'm trying to containerize the app. Below is my Dockerfile, FROM ubuntu:18.04 FROM continuumio/anaconda3 FROM node:10 RUN conda update -n base -c defaults conda RUN conda create -n env…
Ajay A
  • 1,030
  • 1
  • 7
  • 19
2
votes
1 answer

Python Script runs in PyCharm but Fails in Task Scheduler (Turbodbc)

I have a large python script that runs just fine in PyCharm and CMD window but it keeps getting hung up and failing at the same point when I automate it through task scheduler. I have narrowed down the point in the code that it is having issues with…
1
vote
0 answers

Turbodbc - Getting Output from Multi-Statement Query

I am struggling to access the results of a stored procedure giving me the identity of the row just inserted using Turbodbc 4.1.2, Python 3.7, and SQL Server 2017. My procedure runs along the following lines: CREATE OR ALTER PROCEDURE [dbo].[testSP]…
Alex D
  • 46
  • 1
  • 8
1
vote
1 answer

Error when writing dask dataframe to mssql via turbodc

I have a dask dataframe which has 220 partitions and 7 columns. I have imported this file from a bcp file as and completed some wrangling in dask. I then want to write this whole file to mssql using turboodbc. I connect to the DB as follows: mydb =…
Sql_Pete_Belfast
  • 570
  • 4
  • 23
1
vote
2 answers

How to fast insert data from Python 3 to SQL Server?

I'm having issues quickly inserting large volumes of data from Python3 into SQL Server. The target table has 9 columns with 3 indexes and 1 primary key. The below code works but it's a lot slower than I would like. See timing below: -- 1,000…
fcol
  • 169
  • 3
  • 15
0
votes
1 answer

Cannot install turbodbc on linunx

I am trying to install turbodbc with pip but I am getting the following error x86_64-linux-gnu-gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O2 -Wall -g -fstack-protector-strong -Wformat -Werror=format-security -g -flto…
Alex T
  • 3,529
  • 12
  • 56
  • 105
0
votes
0 answers

Encountered error while trying to install package turbodb

Docker build is failing upon installing turbodbc in dockerfile. This Dockerfile was successfully built a week before but now it's failing even though there is no change in the application and the infrastructure. Dockerfile # FROM python:3.9-slim #…
0
votes
0 answers

turbodbc on Databricks - This installation of turbodbc does not support Apache Arrow extensions. Please install the `pyarrow` package

I'm trying to use turbodbc with Pyarrow support on Databricks - runtime 7.2. Turbodbc works without the pyarrow support well on the same same instance. From Databricks 7.2 release page it says that Pyarrow is already which I've verified to be true.…
Vijay
  • 1,030
  • 11
  • 34
0
votes
0 answers

ODBC for SQL Server in Python

I have requirement to extract data from SQL Server and create a .csv file from numerous tables. So I created a python script to do this activity which uses pyodbc/turbodbc connection with SQL Server ODBC Drivers. It works fine sometimes however it…
0
votes
1 answer

Create a procedure with turbodbc

I'm trying to create procedure on Teradata using turbodbc. There is my sample code: from turbodbc import connect con = connect(dsn="Teradata") cur = con.cursor() cur.execute(""" create procedure dev.test_procedure ( ) sql security invoker begin …
anfrolov
  • 1
  • 1
0
votes
1 answer

Turbodbc very slow on batch inserts

I am investigating whether Turbodbc can solve a problem for us when it come to massive amounts of DB inserts. We are talking millions of batch inserts. At the moment, it is a lot slower than any other solutions I have tried, for instance mongodb…
user3454396
  • 403
  • 4
  • 11
0
votes
0 answers

Executemany throws "Invalid number of parameters (expected 12, got 71625)" on INSERT into a SQL Server table

I read into a dataframe from an Excel file of 71k rows (via pandas.read_excel()) and then want to insert it into a database on a local SQL Server via turbodbc. Code: query = 'INSERT INTO сonnTable (ID, SiteRootID, ElementID, ElementType, Username,…
evictorov
  • 33
  • 1
  • 12
0
votes
2 answers

Create a database with sqlalchemy-turbodbc on MSSQL Server

I am trying to create a database on MSSQL server with sqlalchemy and turbodbc. Below is my code from sqlalchemy import create_engine import turbodbc username = '' password = '' server = '' database = '' driver= 'ODBC+Driver+17+for+SQL+Server' con…
Nithin Sai
  • 23
  • 1
  • 6
0
votes
1 answer

Use Turbodbc to connect to SQL Server, simple select

I cannot get Python Turbodbc to connect to a Sql Server table, simple as that seems, to read or write user tables. However I have established ODBC connection, and can print a list of objects from it. 1 List objects from server to test connection. …
Brad Clay
  • 1
  • 3
1
2