问题
I have a table in Oracle DB with one column holding BLOB data. Does NiFi support Blob file from Oracle to PostgreSQL? if yes, what are the processors do I need to use for convert and store the data? I want to see the original content of the blob data in PostgreSQL.
Thank you.
回答1:
You can use ExecuteSQL to get the BLOB data out of Oracle, but currently you can't use ExecuteSQLRecord (due to this bug) or use PutDatabaseRecord to put BLOB data into a bytea
field in PostgreSQL (due to this bug). Also I don't believe ConvertJSONToSQL has ever supported BLOB/CLOB, but I'm not totally sure.
In the meantime, you might be able to use ConvertRecord to convert the BLOB to a String and put it in that way. If you can't put a String value into a bytea
column, then perhaps change it to a String column, and then when you query the String column you could wrap it in a decode()
to change it back to bytea
. Not ideal but a possible workaround.
来源:https://stackoverflow.com/questions/54792973/how-can-i-get-the-blob-file-using-nifi