Support Questions
Find answers, ask questions, and share your expertise
Announcements
Alert: Welcome to the Unified Cloudera Community. Former HCC members be sure to read and learn how to activate your account here.

Hi Wthere we can use more than 1 column to generate checksum function

Hi Wthere we can use more than 1 column to generate checksum function

New Contributor

If Suppose I need to generate MD5 using more then 1 columns is it possible?

example : md5('ABS','AB1')='c81e728d9d4c2f636f067f89cc14862c'

2 REPLIES 2

Re: Hi Wthere we can use more than 1 column to generate checksum function

Super Guru
@Sowdhanya Rajendran

Yes, use concat/concat_ws functions and then apply md5 function to generate the checksum/hash value

hive> select md5(concat_ws('','ABS','AB1'));
+-----------------------------------+--+ | _c0 | +-----------------------------------+--+ | 1871d65bc6155a5c24f54c7df6a6d455 | +-----------------------------------+--+

-

If the Answer helped to resolve your issue, Click on Accept button below to accept the answer..

Re: Hi Wthere we can use more than 1 column to generate checksum function

New Contributor

it's working fine Thank you @ Shu