Created 12-16-2016 10:15 PM
the describe command is only giving me the column family and not the columns , how can I see which columns belong to a column family without having to dump the whole table ?
Created 12-16-2016 10:25 PM
You need to scan the whole table to get all columns. Each row in HBase can have its own schema.
Created 12-16-2016 10:25 PM
You need to scan the whole table to get all columns. Each row in HBase can have its own schema.
Created 12-16-2016 10:47 PM
that sounds very odd , so if the table has 1 billon rows and someone asks me to tell which columns it has in a particular column family I have to dump the whole billon rows ?
there has to be some other way
Created 12-17-2016 08:05 PM
No, you are incorrect, Sami. HBase knows the set of column families. It does *not* track the set of qualifiers.
Created 12-18-2016 08:15 AM
If you know that all rows of the table have same no. of columns then you can just get first row (with scan and limit) and parse the columns names for each column family. otherwise @Sergey Soldatov answer is the only way.
Created 12-17-2016 12:18 AM
Because HBase is schemaless Data store and each row can have different columns, you will not be able to know all columns without going through all rows.
You can use Apache Phoenix to create table with fix numbers of columns and insert data through Phoenix. (However, if you use the 'dynamic columns' feature in Phoenix, you also could not be 100% sure about all columns if you don't know the design upfront).