【发布时间】:2018-12-10 21:13:42
【问题描述】:
我有我的ExecuteScript 处理器,我正在尝试将通过的所有文件转换为 utf-8,如果它们最初是 utf-16。
到目前为止:
flowFileList = session.get(100)
if not flowFileList.isEmpty():
for flowFile in flowFileList:
# Process each FlowFile here:
flowFileList.decode("utf-16").encode("utf-8")
我觉得这应该是一个相当简单的操作,如以下答案中所定义:here、here 和 here。
这会引发一个错误,“该对象在”中没有“解码”属性。
如果这是一个愚蠢的问题,请随意说。谢谢
NiFi ExecuteScript 食谱:Cookbook
【问题讨论】:
标签: python utf-8 apache-nifi