How to connect python with vertica using ODBC?
NickName:Chiramet Charoennakasit Ask DateTime:2019-08-07T17:10:51

How to connect python with vertica using ODBC?

import sqlalchemy as sa
conn = "vertica+pyodbc://dbadmin:password@VMart"
sa.create_engine(conn, pool_size=10, max_overflow=20)
%load_ext sql
%sql vertica+pyodbc://VMart

error

(pyodbc.InterfaceError) ('IM002', '[IM002] [Microsoft][ODBC Driver Manager] Data source name not found and no default driver specified (0) (SQLDriverConnect)')

(Background on this error at: http://sqlalche.me/e/rvf5)
Connection info needed in SQLAlchemy format, example:

 postgresql://username:password@hostname/dbname<br>
           or an existing connection: dict_keys([])

First

import sqlalchemy as sa
import urllib
sa.create_engine('vertica+vertica_python://dbadmin:[email protected]:5433/VMart')
%load_ext sql
%sql vertica+pyodbc://VMart

Second

import sqlalchemy as sa
sa.create_engine('vertica+vertica_python://dbadmin:password@VMart')

import pyodbc

Third

conn = pyodbc.connect("DRIVER=Vertica;SERVER=192.168.11.132;DATABASE=VMart;PORT=5433;UID=dbadmin;PWD=password")

same error

error but I already test vertica odbc in windows10. It connect successfuled

(pyodbc.InterfaceError) ('IM002', '[IM002] [Microsoft][ODBC Driver Manager] Data source name not found and no default driver specified (0) (SQLDriverConnect)') (Background on this error at: http://sqlalche.me/e/rvf5)
Connection info needed in SQLAlchemy format, example:

postgresql://username:password@hostname/dbname
or an existing connection: dict_keys([])

Copyright Notice:Content Author:「Chiramet Charoennakasit」,Reproduced under the CC 4.0 BY-SA copyright license with a link to the original source and this disclaimer.
Link to original article:https://stackoverflow.com/questions/57390853/how-to-connect-python-with-vertica-using-odbc

More about “How to connect python with vertica using ODBC?” related questions

How to connect python with vertica using ODBC?

import sqlalchemy as sa conn = "vertica+pyodbc://dbadmin:password@VMart" sa.create_engine(conn, pool_size=10, max_overflow=20) %load_ext sql %sql vertica+pyodbc://VMart error (pyodbc.InterfaceE...

Show Detail

how connect to vertica using pyodbc

I've read the iODBC documentation regarding the odbc.ini, and the Vertica documentation. I also saw a question with the same error, but can't get the connection string to work as suggested in the

Show Detail

Connect R and Vertica using RODBC

This is my first time connecting to Vertica. I have already connected to a MySQL database sucessfully by using RODBC library. I have the database setup in vertica and I installed the windows 64-bi...

Show Detail

Connect to vertica database using odbc in asp.net and return a dataset

I have inserted some rows in vertica database using insert command on terminal.It shows when i read the record using select command.But i am not able to see record when connect to database using ODBC

Show Detail

How to connect Vertica schema with vertica_python?

I try to connect to vertica DB with 2 schema: 'public' and 'my_schema' I can only connect to 'public' schema and not to 'my_schema' import vertica_python conn_info = {'host': '****&#x

Show Detail

Vertica Python Unable to Connect

I'm trying to use the vertica_python module at https://github.com/vertica/vertica-python to connect to my corporate vertica database. My code looks like: from pytrends.request import TrendReq import

Show Detail

Invalid Connection String while trying to connect to Vertica from Mac OS X

I want to develop in Python from my local machine running Mac OS X and connect to a Vertica database in my network. I downloaded the Vertica Mac Driver and set it up according to the instructions...

Show Detail

Vertica odbc missing /opt/vertica/lib64/libverticaodbc_unixodbc.so

I am having issues with opening an odbc connection with Vertica from my machine (running centOS) as far as i understand i have all possible packages installed for this to work but i am still missing

Show Detail

PHP connect to Vertica in VirtualBox

I have problem with connection to Vertica database from PHP code. The situation is this: I'm working on Windows 7, I installed ODBC driver for Vertica, set it up and test connection was successful,

Show Detail

dotnet core odbc vertica with Docker

I have a dotnet core application that connects to Vertica using ODBC System.Data.Odbc. When I run it from my windows machine on Visual Studio it runs fine. But I want to containerize it and run it ...

Show Detail