Hello

Take a look at the example usage of ${fileSize} as shown here [1]

It has been this way for quite a while so you should have no problem
accessing it using the expression language while configuring the flow.
Could you share a template of your flow that is not working?

[1] 
https://nifi.apache.org/docs/nifi-docs/html/expression-language-guide.html#le

Thanks
Joe

On Mon, Mar 28, 2016 at 7:15 PM, Radhakrishna Bhat
<[email protected]> wrote:
> I just looked at the data provdence for one of the flow files and it wasn't
> there.
> I also tried accessing as ${fileSize} in updateAttribute value. I am using
> nifi .4.0. Is this attribute added in the newer versions?
>
> On 28-Mar-2016 18:50, "Matt Burgess" <[email protected]> wrote:
>>
>> Radhakrishna,
>>
>> The "fileSize" attribute should be available for every flow file. Can you
>> describe how you are finding the default set of attributes and which ones
>> you are finding?
>>
>> To test, I generated a flow file with the text "Hello" in it, then sent
>> that to a LogAttribute processor, and got the following output:
>>
>> --------------------------------------------------
>> Standard FlowFile Attributes
>> Key: 'entryDate'
>> Value: 'Mon Mar 28 19:47:03 EDT 2016'
>> Key: 'lineageStartDate'
>> Value: 'Mon Mar 28 19:47:03 EDT 2016'
>> Key: 'fileSize'
>> Value: '5'
>> FlowFile Attribute Map Content
>> Key: 'filename'
>> Value: 'myfile'
>> Key: 'path'
>> Value: './'
>> Key: 'uuid'
>> Value: '11964802-2c2c-4b43-8cb4-a0d724032bbf'
>> --------------------------------------------------
>>
>> The "fileSize" attribute is listed and contains the correct value of 5.
>>
>> Regards,
>> Matt
>>
>>
>> On Mon, Mar 28, 2016 at 4:43 PM, Radhakrishna Bhat
>> <[email protected]> wrote:
>>>
>>> Hi,
>>>
>>> I am trying extract FileSize attribute from a flowfile. I don't see it in
>>> default set of attributes. However, in the documentation it is mentioned
>>> https://nifi.apache.org/docs/nifi-docs/html/getting-started.html#common-attributes.
>>>
>>> Is there any flag that I should enable for me to access fileSize
>>> attribute?
>>>
>>>
>>
>

Reply via email to