<?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: How to pass Default value in the Create Statement of Phoenix Query services ? in Archives of Support Questions (Read Only)</title>
    <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/How-to-pass-Default-value-in-the-Create-Statement-of-Phoenix/m-p/223350#M63366</link>
    <description>&lt;P&gt;This grammar was added in Apache Phoenix-4.9.0 but does not yet exist in the version of Phoenix bundled in an HDP release.&lt;/P&gt;&lt;P&gt;&lt;A href="https://issues.apache.org/jira/browse/PHOENIX-476" target="_blank"&gt;https://issues.apache.org/jira/browse/PHOENIX-476&lt;/A&gt;&lt;/P&gt;</description>
    <pubDate>Wed, 21 Jun 2017 22:49:33 GMT</pubDate>
    <dc:creator>elserj</dc:creator>
    <dc:date>2017-06-21T22:49:33Z</dc:date>
    <item>
      <title>How to pass Default value in the Create Statement of Phoenix Query services ?</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/How-to-pass-Default-value-in-the-Create-Statement-of-Phoenix/m-p/223349#M63365</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;We need to migrate our existing Oracle tables to Hbase tables using the phoenix query services. We are using the 'create statement' in the Phoenix query services to create these tables. For few of our oracle tables, there are some columns which have the default values. These default values are either constant like 0  or variable like 'SYSDATE'.&lt;/P&gt;&lt;P&gt;For example, Oracle table values are like this :&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ACTIVE_IND INTEGER DEFAULT 0&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CREATED_DTTM DATE DEFAULT sysdate&lt;/P&gt;&lt;P&gt;When I am trying to use these default statement in the Phoenix query services , I am getting the following errors :&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;08:52:16  [CREATE - 0 rows, 0.000 secs]  [Code: 602, SQL State: 42P00]  ERROR 602 (42P00): Syntax error. Missing "RPAREN" at line 2, column 169.
... 1 statement(s) executed, 0 rows affected, exec/fetch time: 0.000/0.000 sec  [0 successful, 1 errors]&lt;/P&gt;&lt;P&gt;Can we pass Default values in the Phoenix query services. If yes, then how can we do that ?&lt;/P&gt;</description>
      <pubDate>Wed, 21 Jun 2017 21:58:39 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/How-to-pass-Default-value-in-the-Create-Statement-of-Phoenix/m-p/223349#M63365</guid>
      <dc:creator>prashant_kumar</dc:creator>
      <dc:date>2017-06-21T21:58:39Z</dc:date>
    </item>
    <item>
      <title>Re: How to pass Default value in the Create Statement of Phoenix Query services ?</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/How-to-pass-Default-value-in-the-Create-Statement-of-Phoenix/m-p/223350#M63366</link>
      <description>&lt;P&gt;This grammar was added in Apache Phoenix-4.9.0 but does not yet exist in the version of Phoenix bundled in an HDP release.&lt;/P&gt;&lt;P&gt;&lt;A href="https://issues.apache.org/jira/browse/PHOENIX-476" target="_blank"&gt;https://issues.apache.org/jira/browse/PHOENIX-476&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 21 Jun 2017 22:49:33 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/How-to-pass-Default-value-in-the-Create-Statement-of-Phoenix/m-p/223350#M63366</guid>
      <dc:creator>elserj</dc:creator>
      <dc:date>2017-06-21T22:49:33Z</dc:date>
    </item>
    <item>
      <title>Re: How to pass Default value in the Create Statement of Phoenix Query services ?</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/How-to-pass-Default-value-in-the-Create-Statement-of-Phoenix/m-p/223351#M63367</link>
      <description>&lt;P&gt;Thanks &lt;A rel="user" href="https://community.cloudera.com/users/223/jelser.html" nodeid="223"&gt;@Josh Elser&lt;/A&gt;. I took out the default part and created table. Now I am trying to import data into these table. I have .csv file with tab separated fields. I am getting issues in those columns where there are values with blank in it . for example, one of column which contains the validation logic has value like :&lt;/P&gt;&lt;P&gt;(substring(:col(), 1, 2) != '02' and
  substring(:col(), 3, 2) in ('29', '30') or
  substring(:col(), 1, 2) in&lt;/P&gt;&lt;P&gt;I am running this command to import these csv files into Table :&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;./psql.py -d $'\t' -t POC.STATSTC_TYPE /export/home/KBM_HOU/pkumar/test_data.csv&lt;/P&gt;&lt;P&gt;I am being able to import those rows which does not have this type of validation logic with blank space. Do we need to pass any other argument to ignore those blank spaces in the column values ?&lt;/P&gt;</description>
      <pubDate>Wed, 21 Jun 2017 23:01:11 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/How-to-pass-Default-value-in-the-Create-Statement-of-Phoenix/m-p/223351#M63367</guid>
      <dc:creator>prashant_kumar</dc:creator>
      <dc:date>2017-06-21T23:01:11Z</dc:date>
    </item>
  </channel>
</rss>

