02-13-2024 07:04 AM
Hi Team,
I have a requirement where i need to decrypt a column coming from a snowflake table. Column value present in source table is already in encrypted form.
I used below approaches but none actually worked.
1. Create a java file with decrypt functionality. Used script snap to call this java file but the snap throws an error.
2. Created a python script with decrypt functionality. Used script snap to call this java file but the snap throws an error.
Please help me find a solution for this.
Python script used:
Solved! Go to Solution.
02-14-2024 03:33 AM
Hello @mohammedjs12,
Attached below is a sample pipeline implementing Caesar Cipher in a Script Snap using Python.
You will have to structure the input and the output according to your requirements.
Please let me know if this helps you!
Regards,
Aleksandar.
02-14-2024 03:33 AM
Hello @mohammedjs12,
Attached below is a sample pipeline implementing Caesar Cipher in a Script Snap using Python.
You will have to structure the input and the output according to your requirements.
Please let me know if this helps you!
Regards,
Aleksandar.
02-14-2024 04:22 AM
Also, you can try this in a Mapper Snap with the following expression:
sl.range(0,$ciphertext.length).map(x => $ciphertext.charCodeAt(x)).map(x => ((x >= 65 && x <= 90) || (x>= 97 && x<= 122)) ? String.fromCharCode(x - $shift) : String.fromCharCode(x)).join("")
Please let me know if this helps you!
02-16-2024 01:36 AM
Thanks a ton!!