Closed
Description
What language are you using?
Using with Python
What version are you using?
0.3.1
What database are you using?
Oracle 12c
What dataframe are you using?
PolaRS with PyArrow
Can you describe your bug?
I've a lot of tabels in my Oracle database, which have columns with DATE datatype.
This datatype in Oracle, used to have DATE or DATE+TIME data.
When selected this columns, CX convert it to DATE and I lose the time part of the column.
What are the steps to reproduce the behavior?
Selecting SYSDATE from Oracle is enough to reproduce it.
import connectorx as cx
ENGINE_PATH = oracle+oracledb://user:MyP4ssword@oraclesrv01.mycompany.com:1526/MyServiceName
query = "SELECT SYSDATE FROM dual"
cx.read_sql(ENGINE_PATH, query, return_type="arrow")
# also happen with return_type="polars" or "pandas"
pyarrow.Table
COL1: date32[day]
----
COL1: [[2023-03-08]]
If possible, please include a minimal simple example including:
Database setup if the error only happens on specific data or data type
Any table with DATE datatype.
Other thoughts
If I use CAST(foo AS TIMESTAMP) I can preserve the time part when load in CX.
But I'm planning to do a Extract-Load of a LOT of tables, and write all columns in my query of all tables, will be to much verbose.