How can I get the Blob file using NiFi?

安稳与你 提交于 2020-06-26 14:42:13

问题


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

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!