如何使用NiFi获取Blob文件? [英] How can I get the Blob file using NiFi?

查看:354
本文介绍了如何使用NiFi获取Blob文件?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在Oracle DB中有一张表,其中一列包含BLOB数据. NiFi是否支持从Oracle到PostgreSQL的Blob文件?如果是,我需要使用什么处理器来转换和存储数据?我想在PostgreSQL中查看blob数据的原始内容.

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.

谢谢.

推荐答案

您可以使用ExecuteSQL从Oracle中获取BLOB数据,但目前不能使用ExecuteSQLRecord(由于此错误).另外,我不相信ConvertJSONToSQL曾经支持BLOB/CLOB,但我不确定.

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.

同时,您也许可以使用ConvertRecord将BLOB转换为String并以这种方式放置它.如果无法将String值放入bytea列中,则可以将其更改为String列,然后在查询String列时,可以将其包装在decode()中以将其更改回bytea .不理想,但可能的解决方法.

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.

这篇关于如何使用NiFi获取Blob文件?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆