Support Questions

Find answers, ask questions, and share your expertise

Phoenix table creation on top of restored hbase table

avatar
Contributor

i created a table in phoenix

create table t2(pk varchar primary key, col1 varchar);

upsert into T2 values('1','abcd');

upsert into T2 values('2','123');

select * from T2;
+-----+--------+
| PK | COL1 |
+-----+--------+
| 1 | abcd |
| 2 | 123 |
+-----+--------+

table format in hbase

hbase(main):024:0> scan 'T2'
ROW   COLUMN+CELL
1      column=0:\x00\x00\x00\x00, timestamp=1607423302365, value=x
1      column=0:\x80\x0B, timestamp=1607423302365, value=abcd
2      column=0:\x00\x00\x00\x00, timestamp=1607423295436, value=x
2      column=0:\x80\x0B, timestamp=1607423295436, value=123
2 row(s)

 

i backed up above table and restored in hbase. now i want to create phoenix table on top of that

so i used below command to create table

create table t2(pk varchar primary key, col1 varchar);
2 rows affected (0.016 seconds)

select * from T2;
+-----+-------+
| PK | COL1 |
+-----+-------+
| 1 | |
| 2 | |
+-----+-------+

 

after restored and created table in phoenix the primary key values are coming other values are not showing.

 

please help me to solve this issue

 

2 REPLIES 2

avatar
Super Collaborator

Hello @Manoj690 

 

Thanks for using Cloudera Community. Your concern is Phoenix Table created on top of a Restored Table isn't showing the Non-PrimaryKey Columns correctly.

 

Can you share the Steps used by your Team to backup the Table & subsequent restore. Additionally, Whether the Backup & Restore are being performed within the same Cluster along with the Distribution being used (For Versioning Check).

 

- Smarak 

avatar
Contributor
backup command
running with hbase super user

hbase backup create full hdfs://hostname:port/backup -t table_name

restore command

hbase restore hdfs://hostname:port/backup -t table_name

we did this on same cluster