[
https://issues.apache.org/jira/browse/CAMEL-18615?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Claus Ibsen updated CAMEL-18615:
--------------------------------
Fix Version/s: 3.20.0
> 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
> Fix For: 3.20.0
>
>
> 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)