我正在使用 python,pandas,sqlalchemy和cx_oracle 在Oracle DB中执行选择查询。
但是我无法从具有较长类型的列中检索数据。当我从查询中删除它时,它运行良好,但是当其中包含时,我会得到”(cx_oracle.databaseerror)dpi-1037:rarray位置处的列(*)用错误1406“
我ran ran ran在这篇文章中如何求解错误:ora----- 01406提取的列值被截断了吗?,并阅读官方文档
这个问题似乎与列缓冲区的大小有关,但我不知道如何使用Pandas或其他Python库克服它。
无论如何我能处理这个错误吗?
先感谢您
I am using Python, pandas, sqlalchemy and cx_Oracle to execute a select query in an Oracle DB.
But I am not able to retrieve data from a column that has type LONG. When I remove it from the query, it runs fine, but when it is included I get "(cx_Oracle.DatabaseError) DPI-1037: column at array position (*) fetched with error 1406"
I ran into this post How to solve error: ORA-01406 fetched column value was truncated?, and read the official documentation http://www.dba-oracle.com/t_ora_01406_fetched_column_value_was_truncated.htm
The problem seems to be related to the size of the column buffer but I don't know how I would overcome it using pandas or another python library.
Is there anyway I can deal with this error?
Thank you in advance
发布评论
评论(1)
对于任何偶然发现的人,我最终通过cx_oracle执行查询,然后将结果加载到pandas之后
For anyone who stumbles upon this, I ended up executing the query via cx_Oracle and loading the result with pandas afterwards