-
Notifications
You must be signed in to change notification settings - Fork 163
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
read_sql from Oracle to polars truncates timestamp #273
Comments
Hi @wKollendorf , thanks a lot for the example for error reproduction! Currently we are using query = 'select timestamp_col from sample_db'
df = cx.read_sql(conn, query, return_type='arrow2')
df = pl.from_arrow(df) Can you have a try and see whether it works? |
Hi @wangxiaoying, your fix works fine, thanks!. While testing this, another issue came up: Error message: The same is true for BinaryDouble. |
Hi @wKollendorf , thanks for the report! Can you try |
Hi @wangxiaoying, but failed with following error:
Sorry I am not experienced in building python modules myself. Maybe you have a hint, otherwise I can wait for the release version. Your workaround is working fine. |
Hi @wKollendorf , connectorx is written in rust and we are using the nightly version (for features like GAT). Currently our main branch is using |
Hi @wangxiaoying,
Got openssl from http://slproweb.com/products/Win32OpenSSL.html Found the solution:
Instruct the openssl-sys crate to use a pre-compiled openssl library. If this is not set it will try to compile it and fail (because perl is typically not available on Windows). (link) Back to the root issue: Tried it with: Oracle timestamp is converted to polars.datatypes.Date |
Hi @wKollendorf , thanks for the information. We will add your solution to the document for windows users.
That's weird, it works fine in my environment on query Can you try the previous workaround to see whether it still works on your side? |
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
Result:
2022-04-27 00:00:00
Converting timestamp to varchar (within query) and then to datetime (polars) it works:
Result:
2022-04-27 18:21:22
What is the error?
No error message, but wrong dateime format.
The text was updated successfully, but these errors were encountered: