<?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 unable to use regex in query with tDBRow in Talend Studio</title>
    <link>https://community.qlik.com/t5/Talend-Studio/unable-to-use-regex-in-query-with-tDBRow/m-p/2313867#M84682</link>
    <description>&lt;P&gt;I have a query to be executed in vertica database using tDBRow component.  The query is like this ; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;select col1,&lt;/P&gt;&lt;P&gt;col2,&lt;/P&gt;&lt;P&gt;regexp_replace(regexp_replace(nvl(EFFECTIVE_RES_REQ,RES_REQ),'\s'), '(.*)rusage\[([^\]]*)\bmem=\({0,1}([0-9]+([.]{1}[0-9]+){0,1})(.*)', '\3') AS MEM_REQ,&lt;/P&gt;&lt;P&gt;col4&lt;/P&gt;&lt;P&gt;from table1....&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The third field in select has a regex expression which when i run on sql prompt of vertica database runs fine but with tDBRow it says error due to escape characters first with '\s' &amp;amp; '\'.  In above i am using \s &amp;amp; \b and \ as escape characters. &lt;/P&gt;&lt;P&gt;I tried various combinations like replacing \ with \\ &amp;amp; \s with ' ' but then the output of 3rd column comes blank. &lt;/P&gt;&lt;P&gt;regexp_replace(regexp_replace(nvl(EFFECTIVE_RES_REQ,RES_REQ),' '), '(.*)rusage\\[([^\\]]*)\bmem=\\({0,1}([0-9]+([.]{1}[0-9]+){0,1})(.*)', '3') AS MEM_REQ, &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Can you please help?&lt;/P&gt;</description>
    <pubDate>Fri, 18 Dec 2020 09:20:17 GMT</pubDate>
    <dc:creator>MKAPOOR1596038160</dc:creator>
    <dc:date>2020-12-18T09:20:17Z</dc:date>
    <item>
      <title>unable to use regex in query with tDBRow</title>
      <link>https://community.qlik.com/t5/Talend-Studio/unable-to-use-regex-in-query-with-tDBRow/m-p/2313867#M84682</link>
      <description>&lt;P&gt;I have a query to be executed in vertica database using tDBRow component.  The query is like this ; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;select col1,&lt;/P&gt;&lt;P&gt;col2,&lt;/P&gt;&lt;P&gt;regexp_replace(regexp_replace(nvl(EFFECTIVE_RES_REQ,RES_REQ),'\s'), '(.*)rusage\[([^\]]*)\bmem=\({0,1}([0-9]+([.]{1}[0-9]+){0,1})(.*)', '\3') AS MEM_REQ,&lt;/P&gt;&lt;P&gt;col4&lt;/P&gt;&lt;P&gt;from table1....&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The third field in select has a regex expression which when i run on sql prompt of vertica database runs fine but with tDBRow it says error due to escape characters first with '\s' &amp;amp; '\'.  In above i am using \s &amp;amp; \b and \ as escape characters. &lt;/P&gt;&lt;P&gt;I tried various combinations like replacing \ with \\ &amp;amp; \s with ' ' but then the output of 3rd column comes blank. &lt;/P&gt;&lt;P&gt;regexp_replace(regexp_replace(nvl(EFFECTIVE_RES_REQ,RES_REQ),' '), '(.*)rusage\\[([^\\]]*)\bmem=\\({0,1}([0-9]+([.]{1}[0-9]+){0,1})(.*)', '3') AS MEM_REQ, &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Can you please help?&lt;/P&gt;</description>
      <pubDate>Fri, 18 Dec 2020 09:20:17 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/unable-to-use-regex-in-query-with-tDBRow/m-p/2313867#M84682</guid>
      <dc:creator>MKAPOOR1596038160</dc:creator>
      <dc:date>2020-12-18T09:20:17Z</dc:date>
    </item>
  </channel>
</rss>

