BOB: Business Objects Board
Not endorsed by or affiliated with SAP

Register | Login 

Follow BOB on Twitter! 
Follow BOB on Twitter! (Opens a new window)  

General Notice: No events within the next 45 days.

MD5 hash in BODS


 
Search this topic... | Search Data Integrator... | Search Box
Register or Login to Post    Forum Index -> Data Integrator  Previous TopicPrint TopicNext Topic
Author Message
peilert
Senior Member
Senior Member



Joined: 12 Apr 2006

Posts: 39
Location: the Netherlands


flag
PostPosted: Fri Jan 04, 2019 1:53 am 
Post subject: MD5 hash in BODS

Can anybody tell me how I can calculate a MD5 hash over a table in BODS?
And I want to make a custom function of it.

Thank you very much for helping me!
Back to top
qsi
Forum Member
Forum Member



Joined: 10 Jan 2019

Posts: 1



PostPosted: Thu Jan 10, 2019 6:09 am 
Post subject: Re: MD5 hash in BODS

Hi peilert!
As far as I konow BODS does not have built-in function to calculate MD5 of the table. One of the solutions I've used in the past is to create stored proc in Database (HANA in my case) and execute this proc from BODS via sql() function.

In general - create cursor and loop over all rows in the table with HASH_MD5() function while concatenating your processed row with previous row hash. Though usage of cursors in HANA is not recommend by experts, it working quite fast and stable for me (HANA 1.0 SP12, my tables are relatively small - up to 10 millions rows / 20 column max.).
If you want to calculate hash of the data during load you can use User_Defined transform with md5 python module.

BR
qsi
Back to top
retro
Senior Member
Senior Member



Joined: 28 Feb 2014

Posts: 30



PostPosted: Fri Jun 28, 2019 4:51 am 
Post subject: Re: MD5 hash in BODS

Use the built in python editor in BODS to create an MD5 Hashing.

You can read more about BODS and Python support her:
https://help.sap.com/viewer/e54136ab6a4a43e6a370265bf0a2d744/4.2.9/en-US/576ae1ff6d6d1014b3fc9283b0e91070.html

Python md5 hashing code example:
Code:


import hashlib
hash_object = hashlib.md5(b'Hello World')
hex_dig = hash_object.hexdigest().upper()
print(hex_dig)



You can test the Python below:
https://repl.it/languages/python

Maybe anyone can help me with my question below regarding Data Vault and BODS + other ways of doing hashing in BODS other then Python.
http://www.forumtopics.com/busobj/viewtopic.php?t=249967
Back to top
Display posts from previous:   
Register or Login to Post    Forum Index -> Data Integrator  Previous TopicPrint TopicNext Topic
Page 1 of 1 All times are GMT - 5 Hours
 
Jump to:  

Index | About | FAQ | RAG | Privacy | Search |  Register |  Login 

Get community updates via Twitter:

Not endorsed by or affiliated with SAP
Powered by phpBB © phpBB Group
Generated in 0.0300 seconds using 17 queries. (SQL 0.0032 Parse 0.0013 Other 0.0255)
CCBot/2.0 (https://commoncrawl.org/faq/)
Hosted by ForumTopics.com | Terms of Service
phpBB Customizations by the phpBBDoctor.com
Shameless plug for MomentsOfLight.com Moments of Light Logo