I am trying to connect pandas to Oracle as below(I already downloaded oracle client):

import pandas as pd
import cx_Oracle

host_name = 'aa.com' 
service_name= 'ss' 

dsn = cx_Oracle.makedsn(host=host_name,port=1535,sid=None,service_name=service_name)

con = cx_Oracle.connect(user=username, password=password, dsn= dsn ,encoding = "UTF-8", nencoding = "UTF-8")

my_sql_query=(""" SELECT * FROM schema.tbl1 WHERE ROWNUM =1 """) 

##1- Directly reading SQL to Pandas 
#Read SQL via Oracle connection to Pandas DataFrame 

df = pd.read_sql(my_sql_query, con=con) 

I get: Cannot locate a 64-bit Oracle Client library: "C:\oracle\product\11.2.0\client_1\bin\oci.dll is not the correct architecture". See https://oracle.github.io/odpi/doc/installation.html#windows for help

When I click the link shown in the message, it asks me to run some .exe file. What is this file going to do?

0 Answers