<?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: Incorta Regex formula in Data &amp; Schema Discussions</title>
    <link>https://community.incorta.com/t5/data-schema-discussions/incorta-regex-formula/m-p/5178#M409</link>
    <description>&lt;P&gt;&lt;a href="https://community.incorta.com/t5/user/viewprofilepage/user-id/605"&gt;@mkrieger&lt;/a&gt;&amp;nbsp; - This will depend on whether you are using SparkSQL or Postgres. Here are samples of how you might regex match in each example:&lt;BR /&gt;&lt;BR /&gt;Postgres&lt;/P&gt;
&lt;LI-CODE lang="python"&gt;SELECT CategoryName, (CategoryName ~ 'c') AS regex_column
FROM OnlineStore.ProductCategory&lt;/LI-CODE&gt;
&lt;P&gt;Spark SQL&lt;/P&gt;
&lt;LI-CODE lang="python"&gt;SELECT
    `OnlineStore.productcategory`.`CategoryName` AS `CategoryName`, regexp(`OnlineStore.productcategory`.`CategoryName`, 'c') AS regex_column
FROM
    `OnlineStore.productcategory` `OnlineStore.productcategory`&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Fri, 20 Oct 2023 17:25:21 GMT</pubDate>
    <dc:creator>JoeM</dc:creator>
    <dc:date>2023-10-20T17:25:21Z</dc:date>
    <item>
      <title>Incorta Regex formula</title>
      <link>https://community.incorta.com/t5/data-schema-discussions/incorta-regex-formula/m-p/5173#M408</link>
      <description>&lt;P&gt;Hi,&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I am trying to get regex to work in a materialized view but keep running into "undefined function" errors&lt;/P&gt;
&lt;P&gt;Is there something wrong with my format?&lt;/P&gt;
&lt;DIV&gt;
&lt;DIV&gt;&lt;SPAN&gt;SELECT&lt;/SPAN&gt;&lt;SPAN&gt;&amp;nbsp;Name&lt;/SPAN&gt;&lt;SPAN&gt;,&lt;/SPAN&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/DIV&gt;
&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; UniversalId&lt;/SPAN&gt;&lt;SPAN&gt;,&lt;/SPAN&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/DIV&gt;
&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Item_Description&lt;/SPAN&gt;&lt;SPAN&gt;,&lt;/SPAN&gt;&lt;/DIV&gt;
&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; REGEXP_LIKE&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;Item_Description&lt;/SPAN&gt;&lt;SPAN&gt;,&lt;/SPAN&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;'\d+'&lt;/SPAN&gt;&lt;SPAN&gt;)&lt;/SPAN&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;AS&lt;/SPAN&gt;&lt;SPAN&gt;&amp;nbsp;regex_column&lt;/SPAN&gt;&lt;/DIV&gt;
&lt;BR /&gt;
&lt;DIV&gt;&lt;SPAN&gt;FROM&lt;/SPAN&gt;&lt;SPAN&gt;&amp;nbsp;table&lt;/SPAN&gt;&lt;/DIV&gt;
&lt;/DIV&gt;</description>
      <pubDate>Fri, 20 Oct 2023 17:22:42 GMT</pubDate>
      <guid>https://community.incorta.com/t5/data-schema-discussions/incorta-regex-formula/m-p/5173#M408</guid>
      <dc:creator>mkrieger</dc:creator>
      <dc:date>2023-10-20T17:22:42Z</dc:date>
    </item>
    <item>
      <title>Re: Incorta Regex formula</title>
      <link>https://community.incorta.com/t5/data-schema-discussions/incorta-regex-formula/m-p/5178#M409</link>
      <description>&lt;P&gt;&lt;a href="https://community.incorta.com/t5/user/viewprofilepage/user-id/605"&gt;@mkrieger&lt;/a&gt;&amp;nbsp; - This will depend on whether you are using SparkSQL or Postgres. Here are samples of how you might regex match in each example:&lt;BR /&gt;&lt;BR /&gt;Postgres&lt;/P&gt;
&lt;LI-CODE lang="python"&gt;SELECT CategoryName, (CategoryName ~ 'c') AS regex_column
FROM OnlineStore.ProductCategory&lt;/LI-CODE&gt;
&lt;P&gt;Spark SQL&lt;/P&gt;
&lt;LI-CODE lang="python"&gt;SELECT
    `OnlineStore.productcategory`.`CategoryName` AS `CategoryName`, regexp(`OnlineStore.productcategory`.`CategoryName`, 'c') AS regex_column
FROM
    `OnlineStore.productcategory` `OnlineStore.productcategory`&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 20 Oct 2023 17:25:21 GMT</pubDate>
      <guid>https://community.incorta.com/t5/data-schema-discussions/incorta-regex-formula/m-p/5178#M409</guid>
      <dc:creator>JoeM</dc:creator>
      <dc:date>2023-10-20T17:25:21Z</dc:date>
    </item>
    <item>
      <title>Re: Incorta Regex formula</title>
      <link>https://community.incorta.com/t5/data-schema-discussions/incorta-regex-formula/m-p/5180#M410</link>
      <description>&lt;P&gt;Thanks for the quick response!&lt;BR /&gt;I've confirmed that I am using SparkSQL, although I am still running into the following error message:&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;org.apache.spark.sql.AnalysisException: Undefined function: 'regexp'. This function is neither a registered temporary function nor a permanent function registered in the database 'default'&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;Generated from this query:&lt;/P&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;SELECT&lt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, 20 Oct 2023 20:52:47 GMT</pubDate>
      <guid>https://community.incorta.com/t5/data-schema-discussions/incorta-regex-formula/m-p/5180#M410</guid>
      <dc:creator>mkrieger</dc:creator>
      <dc:date>2023-10-20T20:52:47Z</dc:date>
    </item>
    <item>
      <title>Re: Incorta Regex formula</title>
      <link>https://community.incorta.com/t5/data-schema-discussions/incorta-regex-formula/m-p/5186#M411</link>
      <description>&lt;P&gt;&lt;a href="https://community.incorta.com/t5/user/viewprofilepage/user-id/605"&gt;@mkrieger&lt;/a&gt;&amp;nbsp;- I am surprised you are running into that. It might be worth also trying either &lt;A href="https://spark.apache.org/docs/3.3.1/api/sql/index.html#regexp_like" target="_self"&gt;regex_like&lt;/A&gt; or &lt;A href="https://spark.apache.org/docs/3.3.1/api/sql/index.html#rlike" target="_self"&gt;rlike&lt;/A&gt;.&lt;/P&gt;</description>
      <pubDate>Mon, 23 Oct 2023 14:02:32 GMT</pubDate>
      <guid>https://community.incorta.com/t5/data-schema-discussions/incorta-regex-formula/m-p/5186#M411</guid>
      <dc:creator>JoeM</dc:creator>
      <dc:date>2023-10-23T14:02:32Z</dc:date>
    </item>
  </channel>
</rss>

