'MD5/SHA Field Dataset in Data Fusion

I need to concatanate a few string values in order to obtain the SHA256 encrypted string. I've seen Data Fusion has a plugin to do the job:

enter image description here

The documentation however is very poor and nothing I've tried seems to work. I created a table in BQ with the string fields I need to concatanate but the output is same as input. Can anyone provide with an example on how to use this plugin?

EDIT

Below I present the example,

This is how the workflow looks like:

enter image description here

For the testing purposes, I added one column with the following string:

2022-01-01T00:00:00+01:00

enter image description here

And here's the output:

enter image description here



Solution 1:[1]

You can use Wrangler to concatenate the string values.

I tried your scenario adding Wrangler to the Pipeline:

enter image description here

Joining 2 Columns: enter image description here

I named the column new_col, using , as delimiter: enter image description here

Output: enter image description here

Solution 2:[2]

What you described can be achieved by 2 Wranglers:

  1. The first Wrangler will be what @angela-b described. Use the merge directive to create a new column with the concatenation of two columns. Example directive that joins column a and b using , as the delimiter and stores the result in column a_b:
merge a b a_b ,
  1. The second Wrangler will use the hash directive which will hash the column in place using a specified algorithm. Example of a directive that hashes column a_b using MD5:
hash :a_b 'MD5' true

Remember to set the last parameter encode to true so that you get a string output instead of a byte array.

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 Anjela B
Solution 2 Arjan Singh Bal