<?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>topic Re: QLik and Python Data Conversion Speed in Integration, Extension &amp; APIs</title>
    <link>https://community.qlik.com/t5/Integration-Extension-APIs/QLik-and-Python-Data-Conversion-Speed/m-p/79626#M14219</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;‌Can you clarify if you are doing this at Load Time (in Load Script) or at Run Time (on a Sheet, after user’s make selections)? This may be helpful to the answer.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Secondly, you state that you are sending a lot of data in, but are you also getting a lot of data back or just a small set of data? For example, IN: 10,000 rows * 4 columns (40,000 elements) vs OUT: 10 rows * 1 column (10 elements).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you answered Run Time (#1 above) and a low result set ration (#2 above)...&lt;/P&gt;&lt;P&gt;Then I would suggest that you see what options exist to improve your python script. For example, you might be able to reduce it to only use 2 columns (date, serial), then have your Python script access the Name/Values (if needed) from a CSV file on its own. Doing this would reduce your IN: to 20,000 elements (above) which would significantly improve performance for your users. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Of course, the CSV file could be created by your Load Script during data updates so that it is always consistent with the Qlik App and up to date.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope that helps.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 09 Feb 2018 12:29:09 GMT</pubDate>
    <dc:creator>SteveNewman</dc:creator>
    <dc:date>2018-02-09T12:29:09Z</dc:date>
    <item>
      <title>QLik and Python Data Conversion Speed</title>
      <link>https://community.qlik.com/t5/Integration-Extension-APIs/QLik-and-Python-Data-Conversion-Speed/m-p/79625#M14218</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am writing a plugin for Qlik using Python 3.6.4.&amp;nbsp; It takes a large amount of data passed to it from Qlik Sense Desktop through an open port.&amp;nbsp; Once the data has been taken through the port, the Python program then converts the data handed to it from the Qlik Sense into a Python data format by essentially looping through the data.&amp;nbsp; The problem is that this process takes about 2 minutes which is a rather long time compared to the rest of the program.&amp;nbsp; Does anyone have any tips on how to speed up the data conversion process?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If it helps,&amp;nbsp; I am already using maps to speed up part of the looping process and I have provided a snippet of the relevant part of my code below.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Here is a snippet of the relevant part of my code:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Note:&amp;nbsp; request is the data sent to it by Qlik Sense, the data is 4 columns of data storing these items in this order: date, serial number, item name and item value.&amp;nbsp; The date, serial, item_name and item_val variables are lists that correspond to the items passed to it by Qlik Sense.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #cc7832;"&gt;for &lt;/SPAN&gt;rows &lt;SPAN style="color: #cc7832;"&gt;in &lt;/SPAN&gt;request:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; &lt;SPAN style="color: #a5c261;"&gt;'''&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #a5c261;"&gt;&amp;nbsp; This section still needs work to improve its efficiency.&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #a5c261;"&gt;&amp;nbsp; '''&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #a5c261;"&gt;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;date += list(map(&lt;SPAN style="color: #cc7832;"&gt;lambda &lt;/SPAN&gt;c: dt.strptime(c.duals[&lt;SPAN style="color: #6897bb;"&gt;0&lt;/SPAN&gt;].strData&lt;SPAN style="color: #cc7832;"&gt;,&lt;/SPAN&gt;&lt;SPAN style="color: #a5c261;"&gt;'%d/%m/%Y %H:%M:%S'&lt;/SPAN&gt;)&lt;SPAN style="color: #cc7832;"&gt;,&lt;/SPAN&gt;rows.rows))&lt;/P&gt;&lt;P&gt;&amp;nbsp; serial += list(map(&lt;SPAN style="color: #cc7832;"&gt;lambda &lt;/SPAN&gt;c: c.duals[&lt;SPAN style="color: #6897bb;"&gt;1&lt;/SPAN&gt;].numData&lt;SPAN style="color: #cc7832;"&gt;,&lt;/SPAN&gt;rows.rows))&lt;/P&gt;&lt;P&gt;&amp;nbsp; item_name += list(map(&lt;SPAN style="color: #cc7832;"&gt;lambda &lt;/SPAN&gt;c: c.duals[&lt;SPAN style="color: #6897bb;"&gt;2&lt;/SPAN&gt;].strData&lt;SPAN style="color: #cc7832;"&gt;,&lt;/SPAN&gt;rows.rows))&lt;/P&gt;&lt;P&gt;&amp;nbsp; item_val += list(map(&lt;SPAN style="color: #cc7832;"&gt;lambda &lt;/SPAN&gt;c: c.duals[&lt;SPAN style="color: #6897bb;"&gt;1&lt;/SPAN&gt;].numData&lt;SPAN style="color: #cc7832;"&gt;,&lt;/SPAN&gt;rows.rows))&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Matt&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 16 Nov 2024 08:43:38 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Integration-Extension-APIs/QLik-and-Python-Data-Conversion-Speed/m-p/79625#M14218</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2024-11-16T08:43:38Z</dc:date>
    </item>
    <item>
      <title>Re: QLik and Python Data Conversion Speed</title>
      <link>https://community.qlik.com/t5/Integration-Extension-APIs/QLik-and-Python-Data-Conversion-Speed/m-p/79626#M14219</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;‌Can you clarify if you are doing this at Load Time (in Load Script) or at Run Time (on a Sheet, after user’s make selections)? This may be helpful to the answer.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Secondly, you state that you are sending a lot of data in, but are you also getting a lot of data back or just a small set of data? For example, IN: 10,000 rows * 4 columns (40,000 elements) vs OUT: 10 rows * 1 column (10 elements).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you answered Run Time (#1 above) and a low result set ration (#2 above)...&lt;/P&gt;&lt;P&gt;Then I would suggest that you see what options exist to improve your python script. For example, you might be able to reduce it to only use 2 columns (date, serial), then have your Python script access the Name/Values (if needed) from a CSV file on its own. Doing this would reduce your IN: to 20,000 elements (above) which would significantly improve performance for your users. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Of course, the CSV file could be created by your Load Script during data updates so that it is always consistent with the Qlik App and up to date.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope that helps.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 09 Feb 2018 12:29:09 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Integration-Extension-APIs/QLik-and-Python-Data-Conversion-Speed/m-p/79626#M14219</guid>
      <dc:creator>SteveNewman</dc:creator>
      <dc:date>2018-02-09T12:29:09Z</dc:date>
    </item>
  </channel>
</rss>

