1
我花了几个小时试图找出表达式语言来获取流文件内容。如何获取内容?
有一个简单的测试流程,以尝试和学习Nifi在那里我有: GetMongo - > LogAttributes - >把松弛
-----------------------LOG1-----------------------
Standard FlowFile Attributes
Key: 'entryDate'
Value: 'Wed Sep 28 23:58:36 GMT 2016'
Key: 'lineageStartDate'
Value: 'Wed Sep 28 23:58:36 GMT 2016'
Key: 'fileSize'
Value: '70'
FlowFile Attribute Map Content
Key: 'filename'
Value: '43546945658800'
Key: 'path'
Value: './'
Key: 'uuid'
Value: 'd1e10623-0e90-44af-a620-6bed9776ed62'
-----------------------LOG1-----------------------
{ "_id" : { "$oid" : "57ec27ec35a0759d54fb465d" }, "keyA" : "valueA" }
在putSlack表达的测试,我曾尝试:
${flowfile.content}
${message}
${payload}
${msg}
${flowfile-content}
${content}
要添加到此,Apache NiFi表达式语言(EL)指南列出了所有EL函数以及如何使用它们:https://nifi.apache.org/docs/nifi-docs/html/expression-language -guide.html – JDP10101
@Bryan你可否稍微详细说明一下,请如何把属性中的全部内容告诉如何重新找回它。请您需要您的回复谢谢 –
如果您使用ExtractText处理器并添加一个用户定义属性,用户定义属性的名称将成为流文件属性,并且该属性的值是应用于内容的正则表达式。所以foo =。*将选择所有内容并将其放入一个名为foo的属性中。 –