如何掌握内容?

How to get hold of the content?

我现在已经花了几个小时试图找出表达语言来掌握流文件内容。

有一个简单的测试流程来尝试和学习 Nifi 我有: GetMongo -> LogAttributes -> Put Slack

-----------------------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}

没有访问流文件内容的表达语言。属性和内容有意以非常不同的方式存储,以便于在可能代表大量有效负载的流文件中移动。表达式语言仅对属性进行操作。

ExtractText 处理器可用于将流文件的全部内容提取到一个属性中,请记住,只有当您知道内容适合内存没有问题时才应该这样做。