<?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>question Re: Phoenix: how to make regex on field? in Archives of Support Questions (Read Only)</title>
    <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/Phoenix-how-to-make-regex-on-field/m-p/170619#M37371</link>
    <description>&lt;P&gt;Ok super thanks, I didn't try because it was not refer in the documentation that the function like work. &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;</description>
    <pubDate>Wed, 10 Aug 2016 02:31:53 GMT</pubDate>
    <dc:creator>michelsumbul</dc:creator>
    <dc:date>2016-08-10T02:31:53Z</dc:date>
    <item>
      <title>Phoenix: how to make regex on field?</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/Phoenix-how-to-make-regex-on-field/m-p/170616#M37368</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;I have a phoenix view on an existing hbase table. I don't find in the documentation how to select every lines of a table where the column "name" match with a specific regex or function on string like contain, start with, etc. 
For example in "traditional sql": select name,phone from table1 where like "%ab%;
or every ligne with a rowkey that start with "blabla".&lt;/P&gt;&lt;P&gt;Thanks in advance to point me how to do it easily (I hope that's not needed to use UDF...)&lt;/P&gt;&lt;P&gt;Michel&lt;/P&gt;</description>
      <pubDate>Wed, 10 Aug 2016 02:14:29 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/Phoenix-how-to-make-regex-on-field/m-p/170616#M37368</guid>
      <dc:creator>michelsumbul</dc:creator>
      <dc:date>2016-08-10T02:14:29Z</dc:date>
    </item>
    <item>
      <title>Re: Phoenix: how to make regex on field?</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/Phoenix-how-to-make-regex-on-field/m-p/170617#M37369</link>
      <description>&lt;P&gt;
	See &lt;A href="http://phoenix.apache.org/language/index.html#condition" target="_blank"&gt;http://phoenix.apache.org/language/index.html#condition&lt;/A&gt;. Your "traditional sql" approach works with Apache Phoenix.&lt;/P&gt;&lt;PRE&gt;&amp;gt; create table foo(s varchar, pk integer not null primary key);
&amp;gt; upsert into foo values('abcd_bar', 1);
&amp;gt; upsert into foo values('dcba_bar', 2);
&amp;gt; select * from foo where s like 'abcd%';&lt;/PRE&gt;&lt;P&gt;This will return&lt;/P&gt;&lt;PRE&gt;+-----------+-----+
|     S     | PK  |
+-----------+-----+
| abcd_bar  | 1   |
+-----------+-----+&lt;/PRE&gt;</description>
      <pubDate>Wed, 10 Aug 2016 02:16:55 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/Phoenix-how-to-make-regex-on-field/m-p/170617#M37369</guid>
      <dc:creator>elserj</dc:creator>
      <dc:date>2016-08-10T02:16:55Z</dc:date>
    </item>
    <item>
      <title>Re: Phoenix: how to make regex on field?</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/Phoenix-how-to-make-regex-on-field/m-p/170618#M37370</link>
      <description>&lt;P&gt;&lt;A rel="user" href="https://community.cloudera.com/users/1390/michelsumbul.html" nodeid="1390"&gt;@Michel Sumbul&lt;/A&gt; you may find all functions here &lt;A href="https://phoenix.apache.org/language/functions.html" target="_blank"&gt;https://phoenix.apache.org/language/functions.html&lt;/A&gt; and of course you may use 'like' keyword, so it will be as a regular sql query: &lt;/P&gt;&lt;P&gt;select name, phone from table1 where name like '%Smith%'&lt;/P&gt;</description>
      <pubDate>Wed, 10 Aug 2016 02:21:46 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/Phoenix-how-to-make-regex-on-field/m-p/170618#M37370</guid>
      <dc:creator>ssoldatov</dc:creator>
      <dc:date>2016-08-10T02:21:46Z</dc:date>
    </item>
    <item>
      <title>Re: Phoenix: how to make regex on field?</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/Phoenix-how-to-make-regex-on-field/m-p/170619#M37371</link>
      <description>&lt;P&gt;Ok super thanks, I didn't try because it was not refer in the documentation that the function like work. &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 10 Aug 2016 02:31:53 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/Phoenix-how-to-make-regex-on-field/m-p/170619#M37371</guid>
      <dc:creator>michelsumbul</dc:creator>
      <dc:date>2016-08-10T02:31:53Z</dc:date>
    </item>
    <item>
      <title>Re: Phoenix: how to make regex on field?</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/Phoenix-how-to-make-regex-on-field/m-p/170620#M37372</link>
      <description>&lt;P&gt;Now if table has records like &lt;/P&gt;&lt;OL&gt;
&lt;LI&gt;+-----------+-----+&lt;/LI&gt;&lt;LI&gt;|     S     | PK  |&lt;/LI&gt;&lt;LI&gt;+-----------+-----+&lt;/LI&gt;&lt;LI&gt;| abcd_bar  |1|&lt;/LI&gt;&lt;LI&gt;+-----------+-----+&lt;/LI&gt;&lt;LI&gt;| 1234_bar |1|&lt;/LI&gt;&lt;LI&gt;+-----------+-----+&lt;/LI&gt;&lt;/OL&gt;&lt;P&gt;And i want to search only 1234_bar(starting with digits), then how should i write the queries in Phoenix.&lt;/P&gt;,&lt;P&gt;If Table records are like &lt;/P&gt;&lt;OL&gt;
&lt;LI&gt;+-----------+-----+&lt;/LI&gt;&lt;LI&gt;|     S     | PK  |&lt;/LI&gt;&lt;LI&gt;+-----------+-----+&lt;/LI&gt;&lt;LI&gt;| 1234_bar  |1|&lt;/LI&gt;&lt;LI&gt;+-----------+-----+&lt;/LI&gt;&lt;LI&gt;| test_bar |2|&lt;/LI&gt;&lt;LI&gt;+-----------+-----+&lt;/LI&gt;&lt;/OL&gt;&lt;P&gt;And now if i want to search only 1234_bar then how should i write Select query ?&lt;/P&gt;</description>
      <pubDate>Wed, 22 Feb 2017 14:15:27 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/Phoenix-how-to-make-regex-on-field/m-p/170620#M37372</guid>
      <dc:creator>tej_kitkat</dc:creator>
      <dc:date>2017-02-22T14:15:27Z</dc:date>
    </item>
    <item>
      <title>Re: Phoenix: how to make regex on field?</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/Phoenix-how-to-make-regex-on-field/m-p/170621#M37373</link>
      <description>&lt;P&gt;Do not piggy-back on others' questions which have already been answered, please. Ask your own question.&lt;/P&gt;</description>
      <pubDate>Wed, 22 Feb 2017 23:36:06 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/Phoenix-how-to-make-regex-on-field/m-p/170621#M37373</guid>
      <dc:creator>elserj</dc:creator>
      <dc:date>2017-02-22T23:36:06Z</dc:date>
    </item>
  </channel>
</rss>

