2

We have some tables in form of Parent-child in sql server and we want transform them into a bigtable in . I want use a composite Rowkey for this htable but i don't know if it is possible to have null value as part of rowkey.

Afshin Moazami
  • 2,092
  • 5
  • 33
  • 55
Asma
  • 117
  • 1
  • 5
  • 14

1 Answers1

2

Well your description of the problem seems a bit imprecise, but I try to answer your question according to the NULL values in the rowkey:

You can use NULL values in the rowkey, but you have to serialize "NULL" to an appropriate binary representation (maybe ASCII NULL). The problem is you should avoid this really, because why would you have some parts of the rowkey with NULL in it? The rowkey is much the same as a primary key in a relational database, although it is a bit more (the one and only index of your data). I think in the most relational databases NULL values are not allowed in the primray key so in HBase it is conceptualy the same.

So if you want to migrate data from a relational database, try to check your indices, primary keys and the query-pattern and than decide, how the create the rowkey.

user2078148
  • 591
  • 1
  • 4
  • 13