<?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: Best approach for generating table's each column value from SQL query. in Data Quality</title>
    <link>https://community.qlik.com/t5/Data-Quality/Best-approach-for-generating-table-s-each-column-value-from-SQL/m-p/2281883#M3679</link>
    <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;Could you please also post your whole work flow screenshots on forum? Have you tried to use t&amp;lt;DB&amp;gt;row component to execute a sql query?&lt;/P&gt;
&lt;P&gt;Best regards&lt;/P&gt;
&lt;P&gt;Sabrina&lt;/P&gt;</description>
    <pubDate>Mon, 16 Oct 2017 03:59:00 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2017-10-16T03:59:00Z</dc:date>
    <item>
      <title>Best approach for generating table's each column value from SQL query.</title>
      <link>https://community.qlik.com/t5/Data-Quality/Best-approach-for-generating-table-s-each-column-value-from-SQL/m-p/2281882#M3678</link>
      <description>&lt;P&gt;I have 4 SQL tables named&lt;STRONG&gt; template, dates, calc, company &lt;/STRONG&gt;and &lt;STRONG&gt;option&lt;/STRONG&gt;.&lt;BR /&gt;Option is a target table and rest are source tables.&lt;BR /&gt;&lt;BR /&gt;Tabe Structure:&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;Template&lt;/STRONG&gt; table holds calc_id(calc) for each column.&lt;BR /&gt;Example:&lt;/P&gt;
&lt;PRE&gt;   id    COLUMNA        COLUMNB    ......................    COLUMNZ 
   1        9              119                                   5&lt;/PRE&gt;
&lt;P&gt;&lt;BR /&gt;Calc table holds SQL for each calc_id&lt;BR /&gt;Example:&amp;nbsp; &amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;calc_id                      SQL
 9                         Select sum(abc) from xyz
 119                       Select count(def) from xyz where id is not null&lt;/PRE&gt;
&lt;P&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;STRONG&gt;Company&lt;/STRONG&gt; table holds unique companies .&lt;BR /&gt;Example:&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;company_id        company
      1            AABB&lt;/PRE&gt;
&lt;P&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;STRONG&gt;Dates&lt;/STRONG&gt;&amp;nbsp;table holds date ranges&lt;BR /&gt;Example:&lt;/P&gt;
&lt;PRE&gt;date_range_from          date_range_to        date_indicator
 01-01-2016                31-12-2016           Y
 01-01-2016                31-01-2016           M  &lt;/PRE&gt;
&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;BR /&gt;&lt;STRONG&gt;Option&lt;/STRONG&gt; table holds cross join of source tables except for calc table&lt;BR /&gt;Example:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt; id   comapny_id   date_range_from     date_range_to       columnA      columnB    ColumnC
 1     AABB              01-01-2916    31-01-2016           9             119       125&lt;/PRE&gt;
&lt;P&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;STRONG&gt;Option&lt;/STRONG&gt; table INNER JOIN &lt;STRONG&gt;Calc&lt;/STRONG&gt; Table Output&lt;BR /&gt;&amp;nbsp; &lt;SPAN&gt;Example: &lt;/SPAN&gt;&lt;/P&gt;
&lt;PRE&gt;id   comapny_id   date_range_from     date_range_to         columnA                    columnB        ColumnC&lt;BR /&gt;1     AABB          01-01-2916        31-01-2016          Select sum(abc) from xyz    SQL Statement  SQL Statement&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;Now&amp;nbsp; ColumnA value=&lt;/P&gt;
&lt;PRE&gt;Select sum(abc) from xyz where date_range_from &amp;gt;='01-01-2916' and  date_range_to&amp;lt;= '31-01-2016 ' where company_name='AABB'.&lt;/PRE&gt;
&lt;P&gt;&lt;BR /&gt;I have created ETL for this, check snapshots below.&lt;BR /&gt;Problem with this, its taking hours to finish and template and company table is growing very fast.&lt;BR /&gt;Is there any component available somewhat like tMap and runs SQL to generate value for each column.&lt;BR /&gt;What's the best job design for such kind of requirement?&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 16 Nov 2024 09:12:03 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Data-Quality/Best-approach-for-generating-table-s-each-column-value-from-SQL/m-p/2281882#M3678</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2024-11-16T09:12:03Z</dc:date>
    </item>
    <item>
      <title>Re: Best approach for generating table's each column value from SQL query.</title>
      <link>https://community.qlik.com/t5/Data-Quality/Best-approach-for-generating-table-s-each-column-value-from-SQL/m-p/2281883#M3679</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;Could you please also post your whole work flow screenshots on forum? Have you tried to use t&amp;lt;DB&amp;gt;row component to execute a sql query?&lt;/P&gt;
&lt;P&gt;Best regards&lt;/P&gt;
&lt;P&gt;Sabrina&lt;/P&gt;</description>
      <pubDate>Mon, 16 Oct 2017 03:59:00 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Data-Quality/Best-approach-for-generating-table-s-each-column-value-from-SQL/m-p/2281883#M3679</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2017-10-16T03:59:00Z</dc:date>
    </item>
    <item>
      <title>Re: Best approach for generating table's each column value from SQL query.</title>
      <link>https://community.qlik.com/t5/Data-Quality/Best-approach-for-generating-table-s-each-column-value-from-SQL/m-p/2281884#M3680</link>
      <description>&lt;P&gt;Hi Sabrina,&lt;BR /&gt;Below is the job flow&lt;BR /&gt;&lt;SPAN class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Step1.png" style="width: 999px;"&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="0683p000009LrOu.png"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/149928iA80584B741F06FCB/image-size/large?v=v2&amp;amp;px=999" role="button" title="0683p000009LrOu.png" alt="0683p000009LrOu.png" /&gt;&lt;/span&gt;&lt;/SPAN&gt;&lt;SPAN class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="step2.png" style="width: 943px;"&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="0683p000009LrOz.png"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/127970iA61A9D051163FAE3/image-size/large?v=v2&amp;amp;px=999" role="button" title="0683p000009LrOz.png" alt="0683p000009LrOz.png" /&gt;&lt;/span&gt;&lt;/SPAN&gt;&lt;/P&gt; 
&lt;P&gt;&lt;BR /&gt;As company and dates table will grow this job will take days to complete.&lt;BR /&gt;The better approach for this scenario will be?&lt;BR /&gt;&lt;BR /&gt;Thanks&amp;nbsp;&lt;BR /&gt;Gulshan&lt;/P&gt;</description>
      <pubDate>Mon, 16 Oct 2017 07:00:30 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Data-Quality/Best-approach-for-generating-table-s-each-column-value-from-SQL/m-p/2281884#M3680</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2017-10-16T07:00:30Z</dc:date>
    </item>
  </channel>
</rss>

