You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@camel.apache.org by "Claus Ibsen (Jira)" <ji...@apache.org> on 2022/10/21 11:36:00 UTC
[jira] [Commented] (CAMEL-18615) Using CSVDataformat in a Route Template
[ https://issues.apache.org/jira/browse/CAMEL-18615?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17622206#comment-17622206 ]
Claus Ibsen commented on CAMEL-18615:
-------------------------------------
Yeah we should make the reifier parse for property placeholders which is needed by route templates to support this.
> Using CSVDataformat in a Route Template
> ---------------------------------------
>
> Key: CAMEL-18615
> URL: https://issues.apache.org/jira/browse/CAMEL-18615
> Project: Camel
> Issue Type: New Feature
> Affects Versions: 3.18.2
> Environment: Camel version: 3.18.2
> JDK: 11 (Temurin)
> Reporter: Raymond
> Priority: Minor
>
> I have a rout template like this:
> {code:java}
> @Override
> public void configure() throws Exception {
> CsvDataFormat csv = new CsvDataFormat();
> csv.setDelimiter(new Character(','));
> csv.setUseMaps(true);
> routeTemplate("csv-action")
> .templateParameter("in")
> .templateParameter("out")
> .from("{{in}}")
> .unmarshal(csv)
> .to("{{out}}");
> }
> {code}
> I would like to make the CsvDataFormat parameterized. For example, to set the delimiteter. In this case it's outside the routeTemplate (and when it's in it's not interpolated).
> Would be nice to set it like CsvDataFormat options something like this:
> {code:java}
> @Override public void configure() throws Exception {
> routeTemplate("csv-action")
> .templateParameter("in")
> .templateParameter("out")
> .templateParameter("delimiter",",")
> .templateParameter("map","true")
> .from("{{in}}")
> .unmarshal().csv().setDelimiter("{{delimiter}}").setUseMaps("map");
> .to("{{out}}");
> } {code}
>
--
This message was sent by Atlassian Jira
(v8.20.10#820010)