Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Qlik GA: Multivariate Time Series in Qlik Predict: Get Details
cancel
Showing results for 
Search instead for 
Did you mean: 
Gilaka_Sreenivasa
Contributor
Contributor

Talend Custom Routine – MD5 Hash Utility

Hi All,

I’m sharing a simple Talend routine to generate an MD5 hash from a string input.
This can be used in your Talend jobs whenever you need hashing(e.g., data anonymization, checksum validation).

Usage in Talend:

  • Save this as a custom routine (HashUtils) in your project.
  • Call it inside a component like tMap with:

package routines;

import java.security.MessageDigest;

public class HashUtils {

public static String md5(String input) {

if (input == null) return "";

try {

MessageDigest md = MessageDigest.getInstance("MD5");

byte[] digest = md.digest(input.getBytes("UTF-8"));

StringBuilder sb = new StringBuilder();

for (byte b : digest) {

sb.append(String.format("%02x", b & 0xff));

}

return sb.toString();

} catch (Exception e) {

throw new RuntimeException(e);

}

}

}

 

===============================

HashUtils.md5(row.inputColumn)

================================

Labels (4)
1 Reply
Shicong_Hong
Employee
Employee

Great post and thank you for your sharing to Qlik community!

Regards

Shicong