How can I decrypt in ODI procedure a file encrypted with Python Fernet Library — oracle-tech

    Forum Stats

  • 3,708,983 Users
  • 2,241,169 Discussions


Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

How can I decrypt in ODI procedure a file encrypted with Python Fernet Library

User_0BFBNUser_0BFBN Posts: 2 Blue Ribbon
edited November 2020 in Oracle Data Integrator

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 =

cipher = Fernet(key)

with open('#SIVALE_INT.NombreArchivoCatKonfioEnc','rb') as df:

  encrypted_data =

decrypted_file = cipher.decrypt(encrypted_data)

with open('#SIVALE_INT.NombreArchivoCatKonfio','wb') as df:


Thanks in advance.



  • User_0BFBNUser_0BFBN Posts: 2 Blue Ribbon

    This is the error when running the package:

    ODI-1228: Task Procedure-PR_DESENCRIPTA_ARCHIVO-Desencripta_Archivo fails on the target connection File_SiVale.

    Caused By: java.sql.SQLException: ODI-40400: Invalid format description

    at com.sunopsis.jdbc.driver.file.impl.metadata.MetaDataExtractor.buildTableDescFromRequestSQLExceptionOnly(

Sign In or Register to comment.