Created 08-11-2016 07:05 AM
Created 08-11-2016 07:49 AM
We don't have support for auto_increment, sequence still in Hive.
There is the following UDF but you would have to restrict the number of mappers to 1 to make this work.
Created 12-15-2016 03:57 PM
Dear All,
I need to generate the surrogate keys(which are sequential) in HIVE.I do not want to go and use the method (java.util.UUID) since it generates 33 bytes of lenghth and i do not want that much length(Though it was unique).So predominantly i can do that in 2 ways if i am not wrong:
1st Method:
To restrict the number of mappers to 1 and use the code for random unique generation of UDF in HIVE.The code repository as mentioned in the above post.
2nd Method:
**** Please Note : I think we cannot restrict the number of mappers to 1 and hence both the methods fail for the creation of unique keys. ****
Please let me know if there is a way to do this?
Thanks,
Lalit