<?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 How to Map HBase Table to Phoenix (&amp;quot;Table undefined&amp;quot; error) in Archives of Support Questions (Read Only)</title>
    <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/How-to-Map-HBase-Table-to-Phoenix-quot-Table-undefined-quot/m-p/95750#M9043</link>
    <description>&lt;P&gt;What is the proper way to map an existing HBase table to a new Phoenix table? Phoenix documentation gives a &lt;A href="https://phoenix.apache.org/faq.html#How_I_map_Phoenix_table_to_an_existing_HBase_table"&gt;light example&lt;/A&gt; on how to do this. When we try this on existing HBase table the Phoenix "create table" command is accepted, however it fails with "table undefined" error when we try to query the new Phoenix table.&lt;/P&gt;&lt;P&gt;How could the create table syntax succeeed, yet the "table undefined" error occur when we query it?&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Hbase table definition&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;tablename = weblog&lt;/P&gt;&lt;P&gt; Columnfamily = clicks &lt;/P&gt;&lt;P&gt;  column=clicks:Compression_ratio&lt;/P&gt;&lt;P&gt;  column=clicks:Cookie1&lt;/P&gt;&lt;P&gt;  column=clicks:Cookie2&lt;/P&gt;&lt;P&gt;  column=clicks:Data_center&lt;/P&gt;&lt;P&gt;  column=clicks:Host&lt;/P&gt;&lt;P&gt;  column=clicks:Incoming_client_protocol&lt;/P&gt;&lt;P&gt;  column=clicks:Rqst_status&lt;/P&gt;&lt;P&gt;  column=clicks:Tran_dt&lt;/P&gt;&lt;P&gt;  column=clicks:Xforwarder&lt;/P&gt;&lt;P&gt;  column=clicks:fdx_cbid&lt;/P&gt;&lt;P&gt;  column=clicks:header_size&lt;/P&gt;&lt;P&gt;  column=clicks:input_bytes&lt;/P&gt;&lt;P&gt;  column=clicks:millisecs_to_serv_rqst&lt;/P&gt;&lt;P&gt;  column=clicks:output_bytes&lt;/P&gt;&lt;P&gt;  column=clicks:referring_ip_addr&lt;/P&gt;&lt;P&gt;  column=clicks:rqst_first_ln&lt;/P&gt;&lt;P&gt;  column=clicks:unknown&lt;/P&gt;&lt;P&gt;  column=clicks:user_agent&lt;/P&gt;&lt;P&gt;  column=clicks:web_user&lt;/P&gt;&lt;P&gt;  column=clicks:web_user2&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;View DDL used in phoenix&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;CREATE VIEW "weblog" ( pk VARCHAR PRIMARY KEY,&lt;/P&gt;&lt;P&gt;"clicks".Compression_ratio VARCHAR,&lt;/P&gt;&lt;P&gt;"clicks".Cookie1 VARCHAR,&lt;/P&gt;&lt;P&gt;"clicks".Cookie2 VARCHAR,&lt;/P&gt;&lt;P&gt;"clicks".Data_center VARCHAR,&lt;/P&gt;&lt;P&gt;"clicks".Host VARCHAR,&lt;/P&gt;&lt;P&gt;"clicks".Incoming_client_protocol VARCHAR,&lt;/P&gt;&lt;P&gt;"clicks".Rqst_status VARCHAR,&lt;/P&gt;&lt;P&gt;"clicks".Tran_dt VARCHAR,&lt;/P&gt;&lt;P&gt;"clicks".Xforwarder VARCHAR,&lt;/P&gt;&lt;P&gt;"clicks".fdx_cbid VARCHAR,&lt;/P&gt;&lt;P&gt;"clicks".header_size VARCHAR,&lt;/P&gt;&lt;P&gt;"clicks".input_bytes VARCHAR,&lt;/P&gt;&lt;P&gt;"clicks".millisecs_to_serv_rqst VARCHAR,&lt;/P&gt;&lt;P&gt;"clicks".output_bytes VARCHAR,&lt;/P&gt;&lt;P&gt;"clicks".referring_ip_addr VARCHAR,&lt;/P&gt;&lt;P&gt;"clicks".rqst_first_ln VARCHAR,&lt;/P&gt;&lt;P&gt;"clicks".unknown VARCHAR,&lt;/P&gt;&lt;P&gt;"clicks".user_agent VARCHAR,&lt;/P&gt;&lt;P&gt;"clicks".web_user VARCHAR,&lt;/P&gt;&lt;P&gt;"clicks".web_user2 VARCHAR)&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;List of tables from Phoenix&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;0: jdbc:phoenix:drh70018.bigdata.fedex.com:21&amp;gt; !tables&lt;/P&gt;&lt;P&gt;+------------------------------------------+------------------------------------------+-----------------------------------------+&lt;/P&gt;&lt;P&gt;|  TABLE_CAT  |  TABLE_SCHEM  |  TABLE_NAME   |&lt;/P&gt;&lt;P&gt;+------------------------------------------+------------------------------------------+-----------------------------------------+&lt;/P&gt;&lt;P&gt;| null  | SYSTEM  | CATALOG   |&lt;/P&gt;&lt;P&gt;| null  | SYSTEM  | SEQUENCE  |&lt;/P&gt;&lt;P&gt;| null  | SYSTEM  | STATS   |&lt;/P&gt;&lt;P&gt;| null  | null  | CUSTOMERS  |&lt;/P&gt;&lt;P&gt;| null  | null  | EXAMPLE   |&lt;/P&gt;&lt;P&gt;| null  | null  | WEB_STAT  |&lt;/P&gt;&lt;P&gt;| null  | null  | weblog&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Error from Phoenix:&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;0: jdbc:phoenix:drh70018.bigdata.fedex.com:21&amp;gt; select * from weblog;&lt;/P&gt;&lt;P&gt;Error: ERROR 1012 (42M03): Table undefined. tableName=WEBLOG (state=42M03,code=1012)&lt;/P&gt;&lt;P&gt;0: jdbc:phoenix:drh70018.bigdata.fedex.com:21&amp;gt;&lt;/P&gt;</description>
    <pubDate>Tue, 20 Oct 2015 22:06:44 GMT</pubDate>
    <dc:creator>wfloyd</dc:creator>
    <dc:date>2015-10-20T22:06:44Z</dc:date>
    <item>
      <title>How to Map HBase Table to Phoenix ("Table undefined" error)</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/How-to-Map-HBase-Table-to-Phoenix-quot-Table-undefined-quot/m-p/95750#M9043</link>
      <description>&lt;P&gt;What is the proper way to map an existing HBase table to a new Phoenix table? Phoenix documentation gives a &lt;A href="https://phoenix.apache.org/faq.html#How_I_map_Phoenix_table_to_an_existing_HBase_table"&gt;light example&lt;/A&gt; on how to do this. When we try this on existing HBase table the Phoenix "create table" command is accepted, however it fails with "table undefined" error when we try to query the new Phoenix table.&lt;/P&gt;&lt;P&gt;How could the create table syntax succeeed, yet the "table undefined" error occur when we query it?&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Hbase table definition&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;tablename = weblog&lt;/P&gt;&lt;P&gt; Columnfamily = clicks &lt;/P&gt;&lt;P&gt;  column=clicks:Compression_ratio&lt;/P&gt;&lt;P&gt;  column=clicks:Cookie1&lt;/P&gt;&lt;P&gt;  column=clicks:Cookie2&lt;/P&gt;&lt;P&gt;  column=clicks:Data_center&lt;/P&gt;&lt;P&gt;  column=clicks:Host&lt;/P&gt;&lt;P&gt;  column=clicks:Incoming_client_protocol&lt;/P&gt;&lt;P&gt;  column=clicks:Rqst_status&lt;/P&gt;&lt;P&gt;  column=clicks:Tran_dt&lt;/P&gt;&lt;P&gt;  column=clicks:Xforwarder&lt;/P&gt;&lt;P&gt;  column=clicks:fdx_cbid&lt;/P&gt;&lt;P&gt;  column=clicks:header_size&lt;/P&gt;&lt;P&gt;  column=clicks:input_bytes&lt;/P&gt;&lt;P&gt;  column=clicks:millisecs_to_serv_rqst&lt;/P&gt;&lt;P&gt;  column=clicks:output_bytes&lt;/P&gt;&lt;P&gt;  column=clicks:referring_ip_addr&lt;/P&gt;&lt;P&gt;  column=clicks:rqst_first_ln&lt;/P&gt;&lt;P&gt;  column=clicks:unknown&lt;/P&gt;&lt;P&gt;  column=clicks:user_agent&lt;/P&gt;&lt;P&gt;  column=clicks:web_user&lt;/P&gt;&lt;P&gt;  column=clicks:web_user2&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;View DDL used in phoenix&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;CREATE VIEW "weblog" ( pk VARCHAR PRIMARY KEY,&lt;/P&gt;&lt;P&gt;"clicks".Compression_ratio VARCHAR,&lt;/P&gt;&lt;P&gt;"clicks".Cookie1 VARCHAR,&lt;/P&gt;&lt;P&gt;"clicks".Cookie2 VARCHAR,&lt;/P&gt;&lt;P&gt;"clicks".Data_center VARCHAR,&lt;/P&gt;&lt;P&gt;"clicks".Host VARCHAR,&lt;/P&gt;&lt;P&gt;"clicks".Incoming_client_protocol VARCHAR,&lt;/P&gt;&lt;P&gt;"clicks".Rqst_status VARCHAR,&lt;/P&gt;&lt;P&gt;"clicks".Tran_dt VARCHAR,&lt;/P&gt;&lt;P&gt;"clicks".Xforwarder VARCHAR,&lt;/P&gt;&lt;P&gt;"clicks".fdx_cbid VARCHAR,&lt;/P&gt;&lt;P&gt;"clicks".header_size VARCHAR,&lt;/P&gt;&lt;P&gt;"clicks".input_bytes VARCHAR,&lt;/P&gt;&lt;P&gt;"clicks".millisecs_to_serv_rqst VARCHAR,&lt;/P&gt;&lt;P&gt;"clicks".output_bytes VARCHAR,&lt;/P&gt;&lt;P&gt;"clicks".referring_ip_addr VARCHAR,&lt;/P&gt;&lt;P&gt;"clicks".rqst_first_ln VARCHAR,&lt;/P&gt;&lt;P&gt;"clicks".unknown VARCHAR,&lt;/P&gt;&lt;P&gt;"clicks".user_agent VARCHAR,&lt;/P&gt;&lt;P&gt;"clicks".web_user VARCHAR,&lt;/P&gt;&lt;P&gt;"clicks".web_user2 VARCHAR)&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;List of tables from Phoenix&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;0: jdbc:phoenix:drh70018.bigdata.fedex.com:21&amp;gt; !tables&lt;/P&gt;&lt;P&gt;+------------------------------------------+------------------------------------------+-----------------------------------------+&lt;/P&gt;&lt;P&gt;|  TABLE_CAT  |  TABLE_SCHEM  |  TABLE_NAME   |&lt;/P&gt;&lt;P&gt;+------------------------------------------+------------------------------------------+-----------------------------------------+&lt;/P&gt;&lt;P&gt;| null  | SYSTEM  | CATALOG   |&lt;/P&gt;&lt;P&gt;| null  | SYSTEM  | SEQUENCE  |&lt;/P&gt;&lt;P&gt;| null  | SYSTEM  | STATS   |&lt;/P&gt;&lt;P&gt;| null  | null  | CUSTOMERS  |&lt;/P&gt;&lt;P&gt;| null  | null  | EXAMPLE   |&lt;/P&gt;&lt;P&gt;| null  | null  | WEB_STAT  |&lt;/P&gt;&lt;P&gt;| null  | null  | weblog&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Error from Phoenix:&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;0: jdbc:phoenix:drh70018.bigdata.fedex.com:21&amp;gt; select * from weblog;&lt;/P&gt;&lt;P&gt;Error: ERROR 1012 (42M03): Table undefined. tableName=WEBLOG (state=42M03,code=1012)&lt;/P&gt;&lt;P&gt;0: jdbc:phoenix:drh70018.bigdata.fedex.com:21&amp;gt;&lt;/P&gt;</description>
      <pubDate>Tue, 20 Oct 2015 22:06:44 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/How-to-Map-HBase-Table-to-Phoenix-quot-Table-undefined-quot/m-p/95750#M9043</guid>
      <dc:creator>wfloyd</dc:creator>
      <dc:date>2015-10-20T22:06:44Z</dc:date>
    </item>
    <item>
      <title>Re: How to Map HBase Table to Phoenix ("Table undefined" error)</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/How-to-Map-HBase-Table-to-Phoenix-quot-Table-undefined-quot/m-p/95751#M9044</link>
      <description>&lt;P&gt;&lt;A rel="user" href="https://community.cloudera.com/users/170/wfloyd.html" nodeid="170"&gt;@Wes Floyd&lt;/A&gt; isn't case-sensitive issue?&lt;/P&gt;</description>
      <pubDate>Tue, 20 Oct 2015 22:14:56 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/How-to-Map-HBase-Table-to-Phoenix-quot-Table-undefined-quot/m-p/95751#M9044</guid>
      <dc:creator>gbraccialli3</dc:creator>
      <dc:date>2015-10-20T22:14:56Z</dc:date>
    </item>
    <item>
      <title>Re: How to Map HBase Table to Phoenix ("Table undefined" error)</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/How-to-Map-HBase-Table-to-Phoenix-quot-Table-undefined-quot/m-p/95752#M9045</link>
      <description>&lt;P&gt;&lt;A rel="user" href="https://community.cloudera.com/users/170/wfloyd.html" nodeid="170"&gt;@Wes Floyd&lt;/A&gt; from phoenix docs (&lt;A href="https://phoenix.apache.org/"&gt;https://phoenix.apache.org/&lt;/A&gt; - home page):&lt;/P&gt;&lt;P&gt;&lt;EM&gt;"Note that the table and column family names are case sensitive, with Phoenix upper-casing all names. To make a name case sensitive in the DDL statement, surround it with double quotes as shown below:"&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;When I did it, I used all UPPER-CASE for both hbase and phoenix, without any quotes.&lt;/P&gt;</description>
      <pubDate>Tue, 20 Oct 2015 23:17:56 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/How-to-Map-HBase-Table-to-Phoenix-quot-Table-undefined-quot/m-p/95752#M9045</guid>
      <dc:creator>gbraccialli3</dc:creator>
      <dc:date>2015-10-20T23:17:56Z</dc:date>
    </item>
    <item>
      <title>Re: How to Map HBase Table to Phoenix ("Table undefined" error)</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/How-to-Map-HBase-Table-to-Phoenix-quot-Table-undefined-quot/m-p/95753#M9046</link>
      <description>&lt;P&gt;&lt;A rel="user" href="https://community.cloudera.com/users/238/gbraccialli.html" nodeid="238"&gt;@Guilherme Braccialli&lt;/A&gt; Good point. I'm surprised the error shows WEBLOG in all caps, because our HBase and Phoenix table definition is in all lower case. Do you suggest we make all our HBase and Phoenix tables in all Upper case to get past the issue? What is your rule of thumb generally for Phoenix/HBase table names? &lt;/P&gt;</description>
      <pubDate>Tue, 20 Oct 2015 23:17:57 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/How-to-Map-HBase-Table-to-Phoenix-quot-Table-undefined-quot/m-p/95753#M9046</guid>
      <dc:creator>wfloyd</dc:creator>
      <dc:date>2015-10-20T23:17:57Z</dc:date>
    </item>
    <item>
      <title>Re: How to Map HBase Table to Phoenix ("Table undefined" error)</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/How-to-Map-HBase-Table-to-Phoenix-quot-Table-undefined-quot/m-p/95754#M9047</link>
      <description>&lt;A rel="user" href="https://community.cloudera.com/users/170/wfloyd.html" nodeid="170"&gt;@Wes Floyd&lt;/A&gt; If your hbase columns are already created. You can just use double quotes around the column name (e.g. "clicks"."millisecs_to_serv_rqst")</description>
      <pubDate>Wed, 21 Oct 2015 02:05:10 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/How-to-Map-HBase-Table-to-Phoenix-quot-Table-undefined-quot/m-p/95754#M9047</guid>
      <dc:creator>awatson</dc:creator>
      <dc:date>2015-10-21T02:05:10Z</dc:date>
    </item>
    <item>
      <title>Re: How to Map HBase Table to Phoenix ("Table undefined" error)</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/How-to-Map-HBase-Table-to-Phoenix-quot-Table-undefined-quot/m-p/95755#M9048</link>
      <description>&lt;P&gt;Lets say you have an existing HBase table called "transactions", column family called "transactions" that has a column called transactionId. You can map that table to a Phoenix view with: CREATE VIEW "TransactionHistory" (k VARCHAR primary key, "Transactions"."transactionId" VARCHAR);. Now you should be able to Select "transactionId" from "Transactions". You can use ALTER VIEW to add additional columns from he HBASE table after that.&lt;/P&gt;</description>
      <pubDate>Mon, 28 Mar 2016 06:17:26 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/How-to-Map-HBase-Table-to-Phoenix-quot-Table-undefined-quot/m-p/95755#M9048</guid>
      <dc:creator>vvaks</dc:creator>
      <dc:date>2016-03-28T06:17:26Z</dc:date>
    </item>
    <item>
      <title>Re: How to Map HBase Table to Phoenix ("Table undefined" error)</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/How-to-Map-HBase-Table-to-Phoenix-quot-Table-undefined-quot/m-p/95756#M9049</link>
      <description>&lt;P&gt;Sir i don't think you have made any mistake while creating the view, just put a double cote (") around the view name while query
 &lt;/P&gt;&lt;P&gt;select * from "weblog";&lt;/P&gt;&lt;P&gt;@&lt;A href="https://community.hortonworks.com/users/170/wfloyd.html"&gt;Wes Floyd&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 27 Sep 2016 21:01:10 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/How-to-Map-HBase-Table-to-Phoenix-quot-Table-undefined-quot/m-p/95756#M9049</guid>
      <dc:creator>bhadraarijit84</dc:creator>
      <dc:date>2016-09-27T21:01:10Z</dc:date>
    </item>
  </channel>
</rss>

