<?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: Dynamic query in global variable to be  used in tMySQLRow in Talend Studio</title>
    <link>https://community.qlik.com/t5/Talend-Studio/Dynamic-query-in-global-variable-to-be-used-in-tMySQLRow/m-p/2270553#M48425</link>
    <description>&lt;P&gt;I see. You cannot store Java code inside a Java variable. It will be treated as a Java String. This is what is happening in your job. What is wrong with the method of adding the code directly to the DB component? Does this break a requirement somewhere?&lt;/P&gt;</description>
    <pubDate>Mon, 27 Jan 2020 14:02:12 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2020-01-27T14:02:12Z</dc:date>
    <item>
      <title>Dynamic query in global variable to be  used in tMySQLRow</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Dynamic-query-in-global-variable-to-be-used-in-tMySQLRow/m-p/2270550#M48422</link>
      <description>&lt;P&gt;Hi everyone!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am generating a dynamic query in tjavaFlex and storing it into global variable.&lt;/P&gt;&lt;P&gt;It is similar to this :globVar =&amp;nbsp;insert into test(id,name) values('"+row1.line.split(",")[0]+"','"+row1.line.split(",")[1]+"')&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;When&amp;nbsp; I use&amp;nbsp; this global variable in tmysqlrow's query tab( for which the input is row1.line), it inserts extra single quote at the start and end which is creating an issue for me.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;If i manually pass the global variable with double quotes at start and end, it works fine.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Any help guys? I am even storing the globVar in a file. and the query is generated fine.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks in advance.&lt;/P&gt;&lt;P&gt;Ravinder&lt;/P&gt;</description>
      <pubDate>Sat, 16 Nov 2024 03:27:05 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Dynamic-query-in-global-variable-to-be-used-in-tMySQLRow/m-p/2270550#M48422</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2024-11-16T03:27:05Z</dc:date>
    </item>
    <item>
      <title>Re: Dynamic query in global variable to be  used in tMySQLRow</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Dynamic-query-in-global-variable-to-be-used-in-tMySQLRow/m-p/2270551#M48423</link>
      <description>&lt;P&gt;Can you show us exactly what you use to set this in the tJavaFlex and exactly what you use in your DB component? Giving us a pseudocode version isn't enough to identify the issue I'm afraid.&lt;/P&gt;</description>
      <pubDate>Mon, 27 Jan 2020 13:48:52 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Dynamic-query-in-global-variable-to-be-used-in-tMySQLRow/m-p/2270551#M48423</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2020-01-27T13:48:52Z</dc:date>
    </item>
    <item>
      <title>Re: Dynamic query in global variable to be  used in tMySQLRow</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Dynamic-query-in-global-variable-to-be-used-in-tMySQLRow/m-p/2270552#M48424</link>
      <description>&lt;P&gt;Part1: So there is delimited file with header is "id,name"&lt;/P&gt;&lt;P&gt;tjavaFlex reads the header and creates a query as :&amp;nbsp;insert into test(id,name) values('"+row1.line.split(",")[0]+"','"+row1.line.split(",")[1]+"')&lt;/P&gt;&lt;P&gt;this query is saved in a globalMap.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Part2. tmysqlrow reads input file rows (row1) which has just one column for e.g : 1,john, and i have used globalMap variable in the query tab. Please see the screenshot.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;It inserts "'"+row1.line.split(",")[0]+"' and '"+row1.line.split(",")[1]+"' in the table.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;But if i copy the generated query within double quotes, it populates actual values in the table i.e. 1 , John.&lt;/P&gt;&lt;BR /&gt;&lt;A href="https://community.qlik.com/legacyfs/online/tlnd_dw_files/0683p000009Lxhy"&gt;Capture.JPG&lt;/A&gt;</description>
      <pubDate>Mon, 27 Jan 2020 13:56:44 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Dynamic-query-in-global-variable-to-be-used-in-tMySQLRow/m-p/2270552#M48424</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2020-01-27T13:56:44Z</dc:date>
    </item>
    <item>
      <title>Re: Dynamic query in global variable to be  used in tMySQLRow</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Dynamic-query-in-global-variable-to-be-used-in-tMySQLRow/m-p/2270553#M48425</link>
      <description>&lt;P&gt;I see. You cannot store Java code inside a Java variable. It will be treated as a Java String. This is what is happening in your job. What is wrong with the method of adding the code directly to the DB component? Does this break a requirement somewhere?&lt;/P&gt;</description>
      <pubDate>Mon, 27 Jan 2020 14:02:12 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Dynamic-query-in-global-variable-to-be-used-in-tMySQLRow/m-p/2270553#M48425</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2020-01-27T14:02:12Z</dc:date>
    </item>
    <item>
      <title>Re: Dynamic query in global variable to be  used in tMySQLRow</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Dynamic-query-in-global-variable-to-be-used-in-tMySQLRow/m-p/2270554#M48426</link>
      <description>&lt;P&gt;I have to use a for loop in tjavaFlex. if there are 10 columns, query will be created for that, if 100, then same will happen for that.&lt;/P&gt;&lt;P&gt;tjavaFlex is creating this query.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Can you suggest any alternate way? Can i pass java code in tmysqlRow?&lt;/P&gt;</description>
      <pubDate>Mon, 27 Jan 2020 14:06:01 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Dynamic-query-in-global-variable-to-be-used-in-tMySQLRow/m-p/2270554#M48426</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2020-01-27T14:06:01Z</dc:date>
    </item>
    <item>
      <title>Re: Dynamic query in global variable to be  used in tMySQLRow</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Dynamic-query-in-global-variable-to-be-used-in-tMySQLRow/m-p/2270555#M48427</link>
      <description>&lt;P&gt;You are inserting data, so why can't you generate the insert statements with the values populated in your tJavaFlex?&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 27 Jan 2020 14:27:34 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Dynamic-query-in-global-variable-to-be-used-in-tMySQLRow/m-p/2270555#M48427</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2020-01-27T14:27:34Z</dc:date>
    </item>
  </channel>
</rss>

