cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

hdbcli cursor usage with Multiprocessing in Python

ailang
Explorer
0 Likes
2,589

I'm using the hdbcli to connect to the HANA DB and was able to get the result set, but I can't seem to use the result set directly in the enumeration in Python, rather I have to run the result set via the loop and then use each row.

This means I have to use an additional loop for post-HANA read and write operations.

If I do use it I'm getting the error "cannot pickle 'pyhdbcli.ResultRow' object", let me know if you have any inputs.

Accepted Solutions (1)

Accepted Solutions (1)

Vitaliy-R
Developer Advocate
Developer Advocate
0 Likes

Could you try

resultset =pool.apply_async( function_name, row.column_values for row in rows)

?

`row.column_values` should give you a tuple of values from the row, instead of an object of `pyhdbcli.ResultRow` data type.

ailang
Explorer

Thank you Witalij, I was able to move forward.

Answers (1)

Answers (1)

ailang
Explorer
0 Likes

Thank you vitaliy.rudnytskiy for your response.

This is the code I'm currently using, as you can see we'll have to loop through each record to process it.

If I use the same code with Python enumeration like below throws the cannot pickle 'pyhdbcli.ResultRow' object

resultset = pool.apply_async( function_name, row for row in rows )