Support Questions
Find answers, ask questions, and share your expertise
Announcements
Alert: Welcome to the Unified Cloudera Community. Former HCC members be sure to read and learn how to activate your account here.

Hbase complete list of columns in column family

Solved Go to solution
Highlighted

Hbase complete list of columns in column family

Contributor

How do we get the complete list of columns that exist in a column Family?

Let us assume i have 5 columns for personal data column familyand 4 columns are present for professional data column family

create 'emp', 'personal data', ’professional data’
1 ACCEPTED SOLUTION

Accepted Solutions

Re: Hbase complete list of columns in column family

HBase does not explicitly track the qualifiers that exist in each family. You either need to maintain this information yourself (e.g. in another table) or scan the data.

4 REPLIES 4

Re: Hbase complete list of columns in column family

HBase does not explicitly track the qualifiers that exist in each family. You either need to maintain this information yourself (e.g. in another table) or scan the data.

Re: Hbase complete list of columns in column family

Contributor

Hi @Josh Elser.

I got the answer by unix command as mentiond below.

Command:-

echo "scan 'emp" | $HBASE_HOME/bin/hbase shell | awk -F'=' '{print $2}' | awk -F ':' '{print $2}'|awk -F ',' '{print $1}' 

Re: Hbase complete list of columns in column family

New Contributor

@vamsi valiveti

Thanks, Worked for me!

Re: Hbase complete list of columns in column family

Contributor

how did you run the script? it didn't return me any result. can your share your's?