ChrisSamo632 commented on PR #6816:
URL: https://github.com/apache/nifi/pull/6816#issuecomment-1473455935

   If you know all of the fields in your data and are happy/able to write them 
all into a `SELECT` statement, omitting just those that aren't wanted, then yes 
`QueryRecord` can be a useful alternative here.
   
   Where I'd have liked this option previosuly is when we receive different 
formats of data from different sources although each of those contains a set of 
known fields, they contain some that aren't wanted but also some we don't know 
about beforehand (e.g. "extra" columns that we need to retain but aren't in a 
set of "known" fields that we could include in a `SELECT`). There's not a way 
with `QueryRecord` (that I can immediately think of) to say "select these 5 
fields, omit these 3, retain any other fields", but a way of deleting just 
those 3 fields from Records would allow this to happen - instead I've ended up 
writing Groovy Scripts (or similar) to cater for this previously and scripting 
often seems like a way that people don't want to go.
   
   I could see this kind of functionality being useful alongside that already 
present in `UpdateRecord` and it seems this function originally was being 
implemented for that processor, but the idea of a separate processor was 
ultimately preferred (looking back at Jiras and previous PRs)


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to