MD5 (Message-Digest algorithm 5) In Informatica

MD5 (Message-Digest algorithm 5) In Informatica

MD5 is a one-way cryptographic hash function in informatica which is used to verify the data integrity. This function uses Message-Digest algorithm 5 (MD5) to generate a 128-bit hash value.

MD5 (Message-Digest algorithm 5) In Informatica
MD5 (Message-Digest algorithm 5) In Informatica

MD5 returns a 32 character string of hexadecimal digits 0-9 & a-f and returns NULL if the input is a null value. MD5 calculates the checksum of the input value which can be compared against the previously generated checksum values to detect changes.

For example if you want to identify changes by comparing more than 10 columns we can do it in expression using column to column comparison but it will cause performance Issues. Instead we can concatenate those 10 columns and use MD5 function to generate the checksum and load to target. Next time when the data comes from source we can generate the MD5 checksum again and compare with the previously generated checksum. This will be more faster and efficient than the normal way of using expression.

MD5 returns different values even if there is any change in the case. For example, MD5(informatica) and MD5(Informatica) return different values. MD5 will support only if the datatypes are String or Binary. Even if you use other datatype, PowerCenter will automatically convert the datatype to String.

<<PM Parse Warning>> [||]: operand converted to a string
… MD5(>>>>SALARY<<<< || COMMISSION_PCT )<<PM Parse Warning>> [||]: operand converted to a string
… MD5(SALARY || >>>>COMMISSION_PCT<<<< )

MD5 (Message-Digest algorithm 5) In Informatica
Mapping – MD5 function in an expression.
MD5 (Message-Digest algorithm 5) In Informatica
Add an output port in Expression – MD5_CHECKSUM
MD5 (Message-Digest algorithm 5) In Informatica
Concatenate First Name, JOB ID, Salary, Commission, Manager ID & Department ID and then use the MD5 function to generate the checksum value.
MD5 (Message-Digest algorithm 5) In Informatica
Session Log – All the input rows are processed successfully and loaded to target.
MD5 (Message-Digest algorithm 5) In Informatica
Target Table – See the last column, 32 character string of hexadecimal value, Since the commission amount is changed from NULL to 0.4 for the employee Valli, the checksum value got changed.