We have some tables in form of Parent-child in sql server and we want transform them into a bigtable in hbase. 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.
-
I'm sorry, i didn't quite get it. – Tariq Sep 27 '13 at 20:43
-
mmm no problem dear tariq – Asma Oct 04 '13 at 09:53
-
Could you please tell me what exactly you were trying to do, if you don't mind?? – Tariq Oct 04 '13 at 09:56
1 Answers
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.

- 591
- 1
- 4
- 13