<?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 How to get globalMap inside Java string to work with SQL component (tDBInput) in Talend Studio</title>
    <link>https://community.qlik.com/t5/Talend-Studio/How-to-get-globalMap-inside-Java-string-to-work-with-SQL/m-p/2317203#M87678</link>
    <description>&lt;P&gt;Hi all,&lt;/P&gt;&lt;P&gt;I managed to use a Manual query inside my TDBInput, like this:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;"SELECT&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;DISTINCT col1&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;'"+globalMap.get("start_dt")+"' as start_date&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;FROM table1;"&lt;/P&gt;&lt;P&gt;The problem is when I try to the same but by reading it from a file with tFileInputRaw-&amp;gt;TFlowToterate-&amp;gt;TDBinput with &lt;/P&gt;&lt;P&gt;globalMap.get("row2.content") inside. The globalMap doesn't get solved at runtime because it's inside a Java string. I've tried to escape it, done lots of single and double quotes combinations, but can't seem to find a way of this to work. It's just the globalMap that it's not being translated, since the query runs smoothly in the database.&lt;/P&gt;&lt;P&gt;How can I workaround reading from SQL file, when my SQL text contains globalMap inside?&lt;/P&gt;&lt;P&gt;My SQL file is the same as the above SQL but without the leading double quotes. Still, doesn't work.&lt;/P&gt;</description>
    <pubDate>Sat, 16 Nov 2024 00:52:11 GMT</pubDate>
    <dc:creator>anna_t1</dc:creator>
    <dc:date>2024-11-16T00:52:11Z</dc:date>
    <item>
      <title>How to get globalMap inside Java string to work with SQL component (tDBInput)</title>
      <link>https://community.qlik.com/t5/Talend-Studio/How-to-get-globalMap-inside-Java-string-to-work-with-SQL/m-p/2317203#M87678</link>
      <description>&lt;P&gt;Hi all,&lt;/P&gt;&lt;P&gt;I managed to use a Manual query inside my TDBInput, like this:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;"SELECT&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;DISTINCT col1&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;'"+globalMap.get("start_dt")+"' as start_date&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;FROM table1;"&lt;/P&gt;&lt;P&gt;The problem is when I try to the same but by reading it from a file with tFileInputRaw-&amp;gt;TFlowToterate-&amp;gt;TDBinput with &lt;/P&gt;&lt;P&gt;globalMap.get("row2.content") inside. The globalMap doesn't get solved at runtime because it's inside a Java string. I've tried to escape it, done lots of single and double quotes combinations, but can't seem to find a way of this to work. It's just the globalMap that it's not being translated, since the query runs smoothly in the database.&lt;/P&gt;&lt;P&gt;How can I workaround reading from SQL file, when my SQL text contains globalMap inside?&lt;/P&gt;&lt;P&gt;My SQL file is the same as the above SQL but without the leading double quotes. Still, doesn't work.&lt;/P&gt;</description>
      <pubDate>Sat, 16 Nov 2024 00:52:11 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/How-to-get-globalMap-inside-Java-string-to-work-with-SQL/m-p/2317203#M87678</guid>
      <dc:creator>anna_t1</dc:creator>
      <dc:date>2024-11-16T00:52:11Z</dc:date>
    </item>
    <item>
      <title>Re: How to get globalMap inside Java string to work with SQL component (tDBInput)</title>
      <link>https://community.qlik.com/t5/Talend-Studio/How-to-get-globalMap-inside-Java-string-to-work-with-SQL/m-p/2317204#M87679</link>
      <description>&lt;P&gt;Could you please print the globalmap in the tjava, just before the database component?&lt;/P&gt;</description>
      <pubDate>Wed, 06 Jan 2021 12:35:04 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/How-to-get-globalMap-inside-Java-string-to-work-with-SQL/m-p/2317204#M87679</guid>
      <dc:creator>hanghan</dc:creator>
      <dc:date>2021-01-06T12:35:04Z</dc:date>
    </item>
    <item>
      <title>Re: How to get globalMap inside Java string to work with SQL component (tDBInput)</title>
      <link>https://community.qlik.com/t5/Talend-Studio/How-to-get-globalMap-inside-Java-string-to-work-with-SQL/m-p/2317205#M87680</link>
      <description>&lt;P&gt;Hi @Ana Tavares​&amp;nbsp;,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Can you try  removing single quotes from this  &amp;nbsp;'"+globalMap.get("start_dt")+"'&amp;nbsp;&lt;/P&gt;&lt;P&gt;Also can you try adding valid datatype ((String)globalMap.get("start_dt"))&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks &amp;amp; Regards,&lt;/P&gt;&lt;P&gt;Madhu Kolli&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 06 Jan 2021 14:43:55 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/How-to-get-globalMap-inside-Java-string-to-work-with-SQL/m-p/2317205#M87680</guid>
      <dc:creator>madhukolli2003</dc:creator>
      <dc:date>2021-01-06T14:43:55Z</dc:date>
    </item>
    <item>
      <title>Re: How to get globalMap inside Java string to work with SQL component (tDBInput)</title>
      <link>https://community.qlik.com/t5/Talend-Studio/How-to-get-globalMap-inside-Java-string-to-work-with-SQL/m-p/2317206#M87681</link>
      <description>&lt;P&gt;Can you try to use context instead of the global variable, and put the row2.content value in that context before proceeding to iteration ?&lt;/P&gt;</description>
      <pubDate>Thu, 07 Jan 2021 06:56:36 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/How-to-get-globalMap-inside-Java-string-to-work-with-SQL/m-p/2317206#M87681</guid>
      <dc:creator>Prakhar1</dc:creator>
      <dc:date>2021-01-07T06:56:36Z</dc:date>
    </item>
  </channel>
</rss>

