All Questions
43 questions
0
votes
0
answers
38
views
Pandas - decimal.InvalidOperation: [<class 'decimal.ConversionSyntax'>] during read_sql
I am running an extraction of a table in Python using Pandas. I am getting this error:
decimal.InvalidOperation: [<class 'decimal.ConversionSyntax'>]
The code:
dataframes[table] = pd.read_sql(...
0
votes
2
answers
197
views
Pandas read_sql with SQLAlchemy from Oracle Database with many parameters
I have a working setup to read sql data into a pandas dataframe:
connect_string = f"DSN={config.DB};UID={credentials['UID']};PWD={credentials['pwd']};DBQ={config.DB_server};DBA=W;APA=T;EXC=F;FEN=...
0
votes
1
answer
1k
views
Error writing column of string containing integers and spaces to Oracle SQL with sqlalchemy
I am trying to write a column of strings of integers and spaces to an Oracle SQL database. When this column is not present, no error when writing. The pandas dataframe looks like this:
** apologies ...
0
votes
3
answers
1k
views
How can I connect to MSSQL and Oracle databases in Python with DSN and read tables into Pandas dataframes?
I want to connect with one python program to different databases (MSSQL and Oracle for now but maybe also postgres/mysql later) and ideally read queries/tables into pandas dataframes. For ...
2
votes
1
answer
1k
views
Pandas + SQLAlchemy Oracle Float Issue
I'm not sure if this is specifically a changed behaviour of SQLAlchemy 2.0 in combination with Pracle as it's not easy to reproduce. (seems to depend on the amount of decimal places)
I have a Pandas ...
1
vote
2
answers
944
views
Select TIMESTAMP(6) WITH TIME ZONE using Pandas, SQLAlchemy and cx_Oracle
I am trying to use pandas to select some data from an Oracle database. The column in question has the data type TIMESTAMP(6) WITH TIME ZONE. I am in the same time zone as the database, but it contains ...
0
votes
0
answers
66
views
Writing a scalable INSERT statement using cx_Oracle
I am attempting to write a script that will allow me to insert values from an uploaded dataframe into a table inside of an Oracle DB; but my issue lies with
too many columns to hard-code
columns aren'...
0
votes
0
answers
114
views
Oracle throwing "Inconsistent datatype" error (ORA-00932) when trying to insert my DataFrame using to_sql()
I have a pandas dataframe which I want to insert into my oracle table.
First, I created a sql aclehmey engine using the create_engine() function. This engine was used in the Dataframe.to_sql function
...
0
votes
1
answer
3k
views
Extract data from Oracle Database with Pandas without Oracle Instant Client
I'm trying to connect to an Oracle Database using pandas + sqlalchemy using this code:
from sqlalchemy.engine import create_engine
import pandas as pd
DIALECT = 'oracle'
SQL_DRIVER = 'cx_oracle'
...
1
vote
3
answers
75
views
How to remove single inverted comma from stored proc
I am stuck at the last movement, i need to remove single inverted commas from price variable that i am parsing in a stored proc
Body_content = message.Body
Body_content = ...
0
votes
1
answer
265
views
How to tweak Pandas method to_sql, so that my data are formatted with right no. of decimals?
There's an Oracle table which I need to fill with weather data. This is what the table looks like:
"IDGRID" NUMBER(12,0) NOT NULL,
"DAY" DATE CONSTRAINT NOT NULL,
"...
2
votes
1
answer
1k
views
The process inserting data from the dataframe into the oracle database is work very slow
The process inserting data from the dataframe into the oracle database is work very slow (more than one hour)
Advise me please, how I can to improve the process of inserting data into the database?
...
2
votes
1
answer
3k
views
Writing to Oracle: TypeError: expecting string or bytes object
I have been breaking my head on this. I am trying to push 65000+ rows with 51 columns to oracle DB but i end up receiving a type error. is there a way i can find out on which column this error is ...
2
votes
2
answers
4k
views
pandas df.to_sql to Oracle database datatype inconsistency
Problem
I have a pandas dataframe and I'm trying to use the pd.df.to_sql() function to an Oracle database. My Oracle database is 19.3c. Seems easy enough right? Why won't it work??
I saw in a few ...
0
votes
1
answer
272
views
read_sql() works but to_sql gives an error Orcale DB sqlalchemy
I am trying to read from Oracle DB using pd.read_sql which gives output and inserting the same but to_sql gives invalid identifier error
Not able to understand why such strange behaviour . Ultimately ...