Unique Key generation in Hive/Hadoop

后端 未结 3 1973
刺人心
刺人心 2021-01-22 02:37

While selecting a set of records from a big data hive table, a unique key needs to be created for each record. In a sequential mode of operation , it is easy to generate unique

3条回答
  •  北恋
    北恋 (楼主)
    2021-01-22 03:20

    Use UUID instead of numbers. It works in a true distributed way.

    select reflect("java.util.UUID", "randomUUID")
    

提交回复
热议问题