You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by GitBox <gi...@apache.org> on 2021/06/19 00:02:16 UTC

[GitHub] [camel] mgenereu opened a new pull request #5712: [CAMEL-16736] Preserve captured headers during CSV Unmarshalling

mgenereu opened a new pull request #5712:
URL: https://github.com/apache/camel/pull/5712


   During the parsing of the CSV and `setHeader` is set to `new String[0]{}`, the headers are collected and beautifully validated.  These headers are then used in Map output but discarded on List output.  It would be nice to preserve that knowledge downstream in the Message header. 


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

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [camel] davsclaus merged pull request #5712: [CAMEL-16736] Preserve captured headers during CSV Unmarshalling

Posted by GitBox <gi...@apache.org>.
davsclaus merged pull request #5712:
URL: https://github.com/apache/camel/pull/5712


   


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

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [camel] mgenereu commented on pull request #5712: [CAMEL-16736] Preserve captured headers during CSV Unmarshalling

Posted by GitBox <gi...@apache.org>.
mgenereu commented on pull request #5712:
URL: https://github.com/apache/camel/pull/5712#issuecomment-865292265


   Update the PR for a flag and updated the tests to match.  Please confirm this was what you were expecting for the interface.  Also, this now introduces some of the the Camel Autoconfiguration mechanisms that I'm not familiar with.  I updated the `components/camel-csv/src/generated/resources/org/apache/camel/dataformat/csv/csv.json` but I'm not sure what else needs to be updated after that.


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

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [camel] davsclaus commented on pull request #5712: [CAMEL-16736] Preserve captured headers during CSV Unmarshalling

Posted by GitBox <gi...@apache.org>.
davsclaus commented on pull request #5712:
URL: https://github.com/apache/camel/pull/5712#issuecomment-865848963


   Yeah adding new options to a dataformat is more tricky as you need to add it into the core model. I will take a look at doing that, as it also requires a rebuild of dsl and whatnot.


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

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [camel] mgenereu commented on pull request #5712: [CAMEL-16736] Preserve captured headers during CSV Unmarshalling

Posted by GitBox <gi...@apache.org>.
mgenereu commented on pull request #5712:
URL: https://github.com/apache/camel/pull/5712#issuecomment-865360964


   Okay.  I updated everything to what I think it should look like but I can't figure out how to get the autogenerators to create the matching effects.


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

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [camel] mgenereu commented on pull request #5712: [CAMEL-16736] Preserve captured headers during CSV Unmarshalling

Posted by GitBox <gi...@apache.org>.
mgenereu commented on pull request #5712:
URL: https://github.com/apache/camel/pull/5712#issuecomment-865220389


   @davsclaus So you're thinking a flag like `collectHeaderNames` on CsvDataFormat that would trigger this?  I'm confused on your second paragraph because that's what I'm doing now on the output.


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

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [camel] davsclaus commented on pull request #5712: [CAMEL-16736] Preserve captured headers during CSV Unmarshalling

Posted by GitBox <gi...@apache.org>.
davsclaus commented on pull request #5712:
URL: https://github.com/apache/camel/pull/5712#issuecomment-864367733


   I think you should find another way, the header on camel-csv is when you want to specify the headers yourself as an input to the parser.
   
   Instead you can find a way to always just output the headers to a message header in the output. And we can then introduce a new boolean option to turn this on|off.


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

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [camel] mgenereu commented on pull request #5712: [CAMEL-16736] Preserve captured headers during CSV Unmarshalling

Posted by GitBox <gi...@apache.org>.
mgenereu commented on pull request #5712:
URL: https://github.com/apache/camel/pull/5712#issuecomment-865220389






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

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [camel] mgenereu edited a comment on pull request #5712: [CAMEL-16736] Preserve captured headers during CSV Unmarshalling

Posted by GitBox <gi...@apache.org>.
mgenereu edited a comment on pull request #5712:
URL: https://github.com/apache/camel/pull/5712#issuecomment-865292265


   Update the PR for a flag and updated the tests to match.  Please confirm this was what you were expecting for the interface.  Also, this now introduces some of the Camel Autoconfiguration mechanisms that I'm not familiar with.  I updated the `components/camel-csv/src/generated/resources/org/apache/camel/dataformat/csv/csv.json` but I'm not sure what else needs to be updated after that.


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

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [camel] mgenereu edited a comment on pull request #5712: [CAMEL-16736] Preserve captured headers during CSV Unmarshalling

Posted by GitBox <gi...@apache.org>.
mgenereu edited a comment on pull request #5712:
URL: https://github.com/apache/camel/pull/5712#issuecomment-865220389






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

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [camel] mgenereu edited a comment on pull request #5712: [CAMEL-16736] Preserve captured headers during CSV Unmarshalling

Posted by GitBox <gi...@apache.org>.
mgenereu edited a comment on pull request #5712:
URL: https://github.com/apache/camel/pull/5712#issuecomment-865220389


   @davsclaus So you're thinking a flag like `captureHeaderRecord` on CsvDataFormat that would trigger this?  I'm confused on your second paragraph because that's what I'm doing now on the output.


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

For queries about this service, please contact Infrastructure at:
users@infra.apache.org