- Subscribe to RSS Feed
- Mark Question as New
- Mark Question as Read
- Float this Question for Current User
- Bookmark
- Subscribe
- Mute
- Printer Friendly Page
MD5 value of a table
- Labels:
-
Apache Hive
Created ‎09-16-2021 09:00 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
How can we get 1 MD5 value for a hive table? Do not need a MD5 value for each record in the table. Is there a way to query the MD5() at a table level. Thanks
Created ‎09-17-2021 06:44 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi @Kiddo
Could you check whether the below link helps your query?
https://community.cloudera.com/t5/Support-Questions/Hive-Do-we-have-checksum-in-hive/td-p/104490
https://community.cloudera.com/t5/Support-Questions/Hive-Can-t-get-the-md5-value/m-p/117696
https://cwiki.apache.org/confluence/display/Hive/LanguageManual+UDF
If you are happy with the reply, mark it Accept as Solution
Created ‎09-19-2021 06:03 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
@Kiddo you either need to get the md5 of all the records or you could collect it for the concatenated form of all the column names in a table.
e.g.
select md5(concat(col1,col2)) from table1;
or.
select md5(concat(*)) from (SELECT collect_list(column_name) as col_name from information_schema.columns where table_schema='db1' and
table_name='table1')e;
Hope this answers your question.
