This is the expected behavior. There was a discussion on the dev@ mailing list
about whether or not
it should output anything at all in that case. The case was made that it is
sometimes beneficial to know
that the query did run and that no results were found.
If you want to filter out these results, you can use a RouteOnAttribute
processor and route based on the
executesql.row.count attribute. For example, you can create a property named
"at.least.one.row"
with a value of "${executesql.row.count:gt(0)}" and then auto-terminate the
'unmatched' relationship.
This will filter out any FlowFile that contains 0 rows.
Hope this helps!
-Mark
> On Aug 5, 2016, at 2:37 PM, Nabegh <[email protected]> wrote:
>
> When no records are returned from the SQL statement, ExecuteSQL returns an
> avro file that contains the schema with no data. Is this the expected
> behaviour?
>
> Thanks.
>
>
>
> --
> View this message in context:
> http://apache-nifi-developer-list.39713.n7.nabble.com/ExecuteSQL-returns-empty-avro-file-tp12965.html
> Sent from the Apache NiFi Developer List mailing list archive at Nabble.com.