All Questions
11 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
1
answer
843
views
Python-oracledb: DPY-6005: cannot connect to database (CONNECTION_ID=""). DPY-3008: unsupported in-band notification with error number 12572
I'm trying to connect to an Oracle database in Python using SQLAlchemy together with OracleDB. But I always get this error:
sqlalchemy.exc.OperationalError: (oracledb.exceptions.OperationalError) DPY-...
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
169
views
select from DUAL python sqlalchemy ORM
I have a custom function on oracle database called create_identifier. It acccept a string and a column and concatenate the abbreviated form of the string to the column.
I am trying to get the python ...
0
votes
1
answer
717
views
connecting python to Oracle using sqlalchemy and oracledb
Need to connect to Oracle using Python that uses SQLAlchemy. I need to use the oracledb package.
Using code from
Github
import os
import oracledb
from sqlalchemy import create_engine
from sqlalchemy ...
0
votes
1
answer
246
views
How can I select * from table, but cast one or more of the columns to a different datatype using ORM (Sqlalchemy)
I have this multiple orm model for fastapi endpoint like this:
@mapper_registry.mapped
@dataclass
class Department:
__tablename__ = "department"
__sa_dataclass_metadata_key__ = &...
0
votes
1
answer
2k
views
DPY-4011: the database or network closed connection
I use flask 2.2.2, gunicorn 20.1.0, sqlalchemy 2.0.13 without Flask-SQLAlchemy and oracledb 1.3.1. I have two scemas and two engines each for their own schema because they need different users to ...
-1
votes
1
answer
925
views
Sqlalchemy not working with python-oracledb and asking for tnsnames.ora directory
no configuration directory to search for tnsnames.ora appears everytime even tho oracledb.connect is working
Please tell me what this tnsnames.org is. I have no idea and how to even find its directory?...
-1
votes
2
answers
603
views
DPI-1047 while connecting to oracle database using python libraries sqlalchemy and oracledb
You are using SqlAlchemy and oracledb to connect to oracle database optionally SqlModel.
You may use code samples given in following answer and following snippet, merged below:
from sqlalchemy.engine ...
0
votes
1
answer
329
views
Gunicorn kills workers while using oracledb + sqlalchemy
I had my FastAPI application running for longer period of time, but recently I've added SQLAlchemy to connect to Oracle database. While I'm running app locally everything is working fine, but as soon ...
7
votes
1
answer
11k
views
NoSuchModuleError: Can't load plugin: sqlalchemy.dialects:oracle.oracledb
When I Try to connect oracle server with SQLAlchemy. I'm getting this error.
NoSuchModuleError: Can't load plugin: sqlalchemy.dialects:oracle.oracledb
from sqlalchemy.engine import create_engine
...