exasol / pyexasol

Exasol Python driver with low overhead, fast HTTP transport and compression
MIT License
71 stars 39 forks source link

Error when importing from pandas #70

Closed Julian-Schulze closed 3 years ago

Julian-Schulze commented 3 years ago

Hi,

I'm trying to import a dataframe into exasol using the import_from_pandas() method, resulting in the following errors. The debug says that the connection step before is ok. Strangely, the import sometimes works anyway and sometimes not.

Importing data: 2021-03-15 16:31:47.053 [WebSocket response 4] { "responseData": { "numResults": 1, "results": [ { "resultType": "rowCount", "rowCount": 19451 } ] }, "status": "ok" } 2021-03-15 16:31:47.200 [WebSocket request 5] { "command": "execute", "sqlText": "IMPORT INTO T_JS_CRITEO_STAGE FROM CSV\nAT '...' FILE '000.gz'" } Traceback (most recent call last): File "c:\program files\python39\lib\runpy.py", line 197, in _run_module_as_main return _run_code(code, main_globals, None, File "c:\program files\python39\lib\runpy.py", line 87, in _run_code exec(code, run_globals) File "C:...\site-packages\pyexasol_utils\http_transport.py", line 259, in server.check_orphaned(args.ppid) File "C:...\site-packages\pyexasol_utils\http_transport.py", line 92, in check_orphaned raise RuntimeError(f"Current process is orphaned, initial ppid={initial_ppid}, current ppid={current_ppid}") RuntimeError: Current process is orphaned, initial ppid=17440, current ppid=5732 2021-03-15 16:31:48.800 [WebSocket abort request] { "command": "abortQuery" } 2021-03-15 16:31:49.596 [WebSocket response 5] { "responseData": { "numResults": 1, "results": [ { "resultType": "rowCount", "rowCount": 19451 } ] }, "status": "ok" } 2021-03-15 16:31:49.596 [WebSocket request 6] { "command": "disconnect" } 2021-03-15 16:31:49.609 [WebSocket response 6] { "status": "ok" } 2021-03-15 16:31:49.609 [WebSocket connection close] Traceback (most recent call last): File "C:\my_project\main.py", line 63, in stage() File "C:\my_project\main.py", line 56, in stage dbconn.import_from_pandas(df, "T_JS_CRITEO_STAGE") File "C:...\site-packages\pyexasol\connection.py", line 280, in import_from_pandas return self.import_from_callback(cb.import_from_pandas, src, table, callback_params, import_params) File "C:...\site-packages\pyexasol\connection.py", line 391, in import_from_callback raise e File "C:...\site-packages\pyexasol\connection.py", line 370, in import_from_callback http_proc.join_with_exc() File "C:...\site-packages\pyexasol\http_transport.py", line 263, in join_with_exc raise RuntimeError(f"HTTP transport process finished with exitcode: {code}") RuntimeError: HTTP transport process finished with exitcode: 1

Process finished with exit code 1

Following versions are used: Python 3.9 Pandas 1.2.3 Pyexasol 0.18.0

littleK0i commented 3 years ago

Thank you for pointing this out. Please update to pyexasol 0.18.1, it should help.

pip install --upgrade pyexasol

Orphan process checking was enabled in 0.18.0 for Windows and disabled for POSIX OS, but it should be other way.

Julian-Schulze commented 3 years ago

Thanks ! That did the job.