【发布时间】:2020-05-29 12:33:17
【问题描述】:
我的 Nifi 流程有以下 avro 定义,我正在从 BLOB 数据库列中读取 a。我在我的 avro 定义中将“xxPZPVSTREAM”列映射为“字节”类型
{
"namespace":"a.b.c",
"name":"pc_history",
"type":"record",
"fields": [
{"name":"COMMITDATETIME","type":["null",{"type":"long","logicalType":"timestamp-millis"}]},
....
{"name":"xxPZPVSTREAM","type":["bytes","null"]},
{"name":"xxx","type":["string","null"]}
]
}
当我尝试将映射数据写入 Postgres 数据库时,出现此错误
org.postgresql.util.PSQLException: Can’t infer the SQL type to use for an instance of [Ljava.lang.Byte;. Use setObject() woth an explicit Types values to specify the type to use.
我可以在 avro 定义中添加额外的元信息以允许 Nifi 处理器正确映射此二进制列吗?
【问题讨论】:
标签: postgresql apache-nifi avro