-
Notifications
You must be signed in to change notification settings - Fork 201
Closed
Labels
bugSomething isn't workingSomething isn't working
Description
What language are you using?
Python
What version are you using?
0.2.5
What database are you using?
Oracle
What dataframe are you using?
polars, pandas, arrow2
Can you describe your bug?
When quering data from Oralce DB, timestamp columns are trunctated to date format (DD-MM-YYYY 00:00:00).
Example query / code
query = 'select timestamp_col from sample_db'
cx.read_sql(conn, query, return_type='polars')
Result:
2022-04-27 00:00:00
Converting timestamp to varchar (within query) and then to datetime (polars) it works:
query = 'select to_char(timestamp_col, 'YYYY-MM-DD HH24:MI:SS') as str_col from sample_db'
cx.read_sql(conn, query, return_type='polars').with_column(
pl.col('str_col').str.strptime(pl.Datetime, '%F %T').alias('datetime_col')
)
Result:
2022-04-27 18:21:22
What is the error?
No error message, but wrong dateime format.
wangxiaoying
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working