2
votes

is that possible to create a hbase table without adding column family, for instance create 'emp','personal data','professional data'

personal data & professional data are the column family, i want to add fields to table without adding column family

for example

        HTable hTable = new HTable(config, "TableName");
        Put p = new Put(Bytes.toBytes("ROW"));
        p.add(Bytes.toBytes("VALUES"); 
        //only the values need to be added to the column without column family. 
1

1 Answers

5
votes

Every HBase table must have at least one column family. Every piece of data in HBase is in a Cell (KeyValue) which has a row, column family, column qualifier, timestamp, and a value. The column families are defined statically when creating the table and cannot be altered without disabling the table. However, you can dynamically create any columns you want inside a column family - in fact each row could have it's own columns.

You can read more at https://hbase.apache.org/book.html#datamodel