<?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 Store the values of a SQL query in a global variable in Talend Studio</title>
    <link>https://community.qlik.com/t5/Talend-Studio/Store-the-values-of-a-SQL-query-in-a-global-variable/m-p/2340576#M108596</link>
    <description>&lt;P&gt;Hello,&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am looking to do something for the first time in Talend. I need to store the results of a SQL query in several global variables. Let me explain. The query below returns 4 values positioned in line in Oracle. In Talend, I would obviously have the same result. What I want to do is store each value in a global variable, but it's difficult to do that knowing that they are returned in a column.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="0695b00000fJyTyAAK.png"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/142542i964399ACF9863A78/image-size/large?v=v2&amp;amp;px=999" role="button" title="0695b00000fJyTyAAK.png" alt="0695b00000fJyTyAAK.png" /&gt;&lt;/span&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="0695b00000fJyU3AAK.png"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/132383iDB3D782FBA589127/image-size/large?v=v2&amp;amp;px=999" role="button" title="0695b00000fJyU3AAK.png" alt="0695b00000fJyU3AAK.png" /&gt;&lt;/span&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'm thinking that maybe I need to create a different SQL query to get the 4 rows in 4 columns, but I don't see how at the moment. But I wonder if there is a Talend component that can convert 4 rows into 4 columns, which I think can help me.&lt;/P&gt;&lt;P&gt;Do you have an idea? I am thinking of creating the global variables using a tFlowToIterate or tSetGlobalVar, I don't know which is better.&lt;/P&gt;</description>
    <pubDate>Fri, 15 Nov 2024 21:54:13 GMT</pubDate>
    <dc:creator>stephbzr</dc:creator>
    <dc:date>2024-11-15T21:54:13Z</dc:date>
    <item>
      <title>Store the values of a SQL query in a global variable</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Store-the-values-of-a-SQL-query-in-a-global-variable/m-p/2340576#M108596</link>
      <description>&lt;P&gt;Hello,&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am looking to do something for the first time in Talend. I need to store the results of a SQL query in several global variables. Let me explain. The query below returns 4 values positioned in line in Oracle. In Talend, I would obviously have the same result. What I want to do is store each value in a global variable, but it's difficult to do that knowing that they are returned in a column.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="0695b00000fJyTyAAK.png"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/142542i964399ACF9863A78/image-size/large?v=v2&amp;amp;px=999" role="button" title="0695b00000fJyTyAAK.png" alt="0695b00000fJyTyAAK.png" /&gt;&lt;/span&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="0695b00000fJyU3AAK.png"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/132383iDB3D782FBA589127/image-size/large?v=v2&amp;amp;px=999" role="button" title="0695b00000fJyU3AAK.png" alt="0695b00000fJyU3AAK.png" /&gt;&lt;/span&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'm thinking that maybe I need to create a different SQL query to get the 4 rows in 4 columns, but I don't see how at the moment. But I wonder if there is a Talend component that can convert 4 rows into 4 columns, which I think can help me.&lt;/P&gt;&lt;P&gt;Do you have an idea? I am thinking of creating the global variables using a tFlowToIterate or tSetGlobalVar, I don't know which is better.&lt;/P&gt;</description>
      <pubDate>Fri, 15 Nov 2024 21:54:13 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Store-the-values-of-a-SQL-query-in-a-global-variable/m-p/2340576#M108596</guid>
      <dc:creator>stephbzr</dc:creator>
      <dc:date>2024-11-15T21:54:13Z</dc:date>
    </item>
    <item>
      <title>Re: Store the values of a SQL query in a global variable</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Store-the-values-of-a-SQL-query-in-a-global-variable/m-p/2340577#M108597</link>
      <description>&lt;P&gt;Hi&lt;/P&gt;&lt;P&gt;I don't understand what's the purpose of storing the value into global variables, however, if you want to have the output like this&lt;/P&gt;&lt;P&gt;c1;c2;c3;c4&lt;/P&gt;&lt;P&gt;484287;4044301;1&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;You can use tDenormalize+tExtractDelimitedFields to achieve it after reading these 4 rows from DB.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Shong&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 13 Apr 2023 10:13:35 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Store-the-values-of-a-SQL-query-in-a-global-variable/m-p/2340577#M108597</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2023-04-13T10:13:35Z</dc:date>
    </item>
    <item>
      <title>Re: Store the values of a SQL query in a global variable</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Store-the-values-of-a-SQL-query-in-a-global-variable/m-p/2340578#M108598</link>
      <description>&lt;P&gt;Hello @Shicong Hong​&amp;nbsp;,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks, I will try your solution. I need to store these 4 values in a global variable for each because they are input parameters I need for a procedure (tDBSP). The reason why I need to get them this way.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 13 Apr 2023 12:20:06 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Store-the-values-of-a-SQL-query-in-a-global-variable/m-p/2340578#M108598</guid>
      <dc:creator>stephbzr</dc:creator>
      <dc:date>2023-04-13T12:20:06Z</dc:date>
    </item>
    <item>
      <title>Re: Store the values of a SQL query in a global variable</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Store-the-values-of-a-SQL-query-in-a-global-variable/m-p/2340579#M108599</link>
      <description>&lt;P&gt;Yes, after you convert rows to columns, you can store the each value to different global variables on  tJavaRow for used later, but you just want to pass these value to tDBSP as input parameters, passing directly them from tExtractDelimitedFields to tDBSP without global variables, you can select the columns on tDBSP.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 14 Apr 2023 03:05:52 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Store-the-values-of-a-SQL-query-in-a-global-variable/m-p/2340579#M108599</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2023-04-14T03:05:52Z</dc:date>
    </item>
    <item>
      <title>Re: Store the values of a SQL query in a global variable</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Store-the-values-of-a-SQL-query-in-a-global-variable/m-p/2340580#M108600</link>
      <description>&lt;P&gt;You could try that too, allow to call Global var by their name.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="0695b00000fKexHAAS.png"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/127997iC941DA7E376131D7/image-size/large?v=v2&amp;amp;px=999" role="button" title="0695b00000fKexHAAS.png" alt="0695b00000fKexHAAS.png" /&gt;&lt;/span&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="0695b00000fKexbAAC.png"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/149577iAC3C355CB0369762/image-size/large?v=v2&amp;amp;px=999" role="button" title="0695b00000fKexbAAC.png" alt="0695b00000fKexbAAC.png" /&gt;&lt;/span&gt;flowinput is here to simulate the db component, use newcolumn1 and newcolumn as colum name.&lt;/P&gt;</description>
      <pubDate>Thu, 20 Apr 2023 15:04:14 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Store-the-values-of-a-SQL-query-in-a-global-variable/m-p/2340580#M108600</guid>
      <dc:creator>AChardon</dc:creator>
      <dc:date>2023-04-20T15:04:14Z</dc:date>
    </item>
  </channel>
</rss>

