I am facing this scenario in ODI 12c
I am going to receive one file encrypted (by fernet library on python) and the corresponding key for it (*.sha file).
I know ODI can run some python-fashioned commands using a user procedure, but I am not sure all the settings I need to put in place in procedure definition window and if there is additional configuration to run those Python commands. Actually the task command in my procedure is still in python (See below). But I think I should use Jython instead of Python commands. Any advice will be appreciated:
from cryptography.fernet import Fernet
fkey = open("llave.sha", 'rb')
key = fkey.read()
cipher = Fernet(key)
with open('#SIVALE_INT.NombreArchivoCatKonfioEnc','rb') as df:
encrypted_data = df.read()
decrypted_file = cipher.decrypt(encrypted_data)
with open('#SIVALE_INT.NombreArchivoCatKonfio','wb') as df:
df.write(decrypted_file)
Thanks in advance.
Antonio
Package.PNG (166 KB)User_Proc1.PNG (136.22 KB)User_Proc2.PNG (220.66 KB)