<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>Question Re: hdbcli cursor usage with Multiprocessing  in Python in Technology Q&amp;A</title>
    <link>https://community.sap.com/t5/technology-q-a/hdbcli-cursor-usage-with-multiprocessing-in-python/qaa-p/12441279#M4659074</link>
    <description>&lt;P&gt;Thank you &lt;SPAN class="mention-scrubbed"&gt;vitaliy.rudnytskiy&lt;/SPAN&gt; for your response.&lt;/P&gt;&lt;P&gt;This is the code I'm currently using, as you can see we'll have to loop through each record to process it.&lt;/P&gt;&lt;P&gt;If I use the same code with Python enumeration like below throws the cannot pickle 'pyhdbcli.ResultRow' object&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;resultset = pool.apply_async( function_name, row for row in rows )&lt;BR /&gt;&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Thu, 19 Aug 2021 16:34:53 GMT</pubDate>
    <dc:creator>ailang</dc:creator>
    <dc:date>2021-08-19T16:34:53Z</dc:date>
    <item>
      <title>hdbcli cursor usage with Multiprocessing  in Python</title>
      <link>https://community.sap.com/t5/technology-q-a/hdbcli-cursor-usage-with-multiprocessing-in-python/qaq-p/12441277</link>
      <description>&lt;P&gt;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.&lt;/P&gt;
  &lt;P&gt;This means I have to use an additional loop for post-HANA read and write operations.&lt;/P&gt;
  &lt;P&gt;If I do use it I'm getting the error "cannot pickle 'pyhdbcli.ResultRow' object", let me know if you have any inputs.&lt;/P&gt;</description>
      <pubDate>Mon, 16 Aug 2021 22:47:37 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/hdbcli-cursor-usage-with-multiprocessing-in-python/qaq-p/12441277</guid>
      <dc:creator>ailang</dc:creator>
      <dc:date>2021-08-16T22:47:37Z</dc:date>
    </item>
    <item>
      <title>Re: hdbcli cursor usage with Multiprocessing  in Python</title>
      <link>https://community.sap.com/t5/technology-q-a/hdbcli-cursor-usage-with-multiprocessing-in-python/qaa-p/12441278#M4659073</link>
      <description>&lt;P&gt;Could you please share the code you are using to make sure others get the complete picture?&lt;/P&gt;&lt;P&gt;Is it what you are looking for, or something else?&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;cursor = conn.cursor()
sql_command = "select * from M_TABLES"
cursor.execute(sql_command)
rows = cursor.fetchall()
for row in rows:
    print(row)
cursor.close()&lt;BR /&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/attachments/storage/7/attachments/1965663-2021-08-19-17-27-16.png" /&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 19 Aug 2021 15:28:30 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/hdbcli-cursor-usage-with-multiprocessing-in-python/qaa-p/12441278#M4659073</guid>
      <dc:creator>Vitaliy-R</dc:creator>
      <dc:date>2021-08-19T15:28:30Z</dc:date>
    </item>
    <item>
      <title>Re: hdbcli cursor usage with Multiprocessing  in Python</title>
      <link>https://community.sap.com/t5/technology-q-a/hdbcli-cursor-usage-with-multiprocessing-in-python/qaa-p/12441279#M4659074</link>
      <description>&lt;P&gt;Thank you &lt;SPAN class="mention-scrubbed"&gt;vitaliy.rudnytskiy&lt;/SPAN&gt; for your response.&lt;/P&gt;&lt;P&gt;This is the code I'm currently using, as you can see we'll have to loop through each record to process it.&lt;/P&gt;&lt;P&gt;If I use the same code with Python enumeration like below throws the cannot pickle 'pyhdbcli.ResultRow' object&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;resultset = pool.apply_async( function_name, row for row in rows )&lt;BR /&gt;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 19 Aug 2021 16:34:53 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/hdbcli-cursor-usage-with-multiprocessing-in-python/qaa-p/12441279#M4659074</guid>
      <dc:creator>ailang</dc:creator>
      <dc:date>2021-08-19T16:34:53Z</dc:date>
    </item>
    <item>
      <title>Re: hdbcli cursor usage with Multiprocessing  in Python</title>
      <link>https://community.sap.com/t5/technology-q-a/hdbcli-cursor-usage-with-multiprocessing-in-python/qaa-p/12441280#M4659075</link>
      <description>&lt;P&gt;Could you try&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;resultset =pool.apply_async( function_name, row.column_values for row in rows)&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;?&lt;/P&gt;&lt;P&gt;`row.column_values` should give you a tuple of values from the row, instead of an object of `pyhdbcli.ResultRow` data type.&lt;/P&gt;</description>
      <pubDate>Thu, 19 Aug 2021 20:39:24 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/hdbcli-cursor-usage-with-multiprocessing-in-python/qaa-p/12441280#M4659075</guid>
      <dc:creator>Vitaliy-R</dc:creator>
      <dc:date>2021-08-19T20:39:24Z</dc:date>
    </item>
    <item>
      <title>Re: hdbcli cursor usage with Multiprocessing  in Python</title>
      <link>https://community.sap.com/t5/technology-q-a/hdbcli-cursor-usage-with-multiprocessing-in-python/qaa-p/12441281#M4659076</link>
      <description>&lt;P&gt;Thank you  Witalij, I was able to move forward.&lt;/P&gt;</description>
      <pubDate>Mon, 23 Aug 2021 04:45:45 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/hdbcli-cursor-usage-with-multiprocessing-in-python/qaa-p/12441281#M4659076</guid>
      <dc:creator>ailang</dc:creator>
      <dc:date>2021-08-23T04:45:45Z</dc:date>
    </item>
  </channel>
</rss>

