Return-Path: X-Original-To: apmail-camel-dev-archive@www.apache.org Delivered-To: apmail-camel-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id AD5688EBD for ; Thu, 18 Aug 2011 19:11:52 +0000 (UTC) Received: (qmail 77319 invoked by uid 500); 18 Aug 2011 19:11:52 -0000 Delivered-To: apmail-camel-dev-archive@camel.apache.org Received: (qmail 77103 invoked by uid 500); 18 Aug 2011 19:11:51 -0000 Mailing-List: contact dev-help@camel.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@camel.apache.org Delivered-To: mailing list dev@camel.apache.org Received: (qmail 77091 invoked by uid 99); 18 Aug 2011 19:11:50 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 18 Aug 2011 19:11:50 +0000 X-ASF-Spam-Status: No, hits=-2001.1 required=5.0 tests=ALL_TRUSTED,NORMAL_HTTP_TO_IP,RP_MATCHES_RCVD,WEIRD_PORT X-Spam-Check-By: apache.org Received: from [140.211.11.116] (HELO hel.zones.apache.org) (140.211.11.116) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 18 Aug 2011 19:11:48 +0000 Received: from hel.zones.apache.org (hel.zones.apache.org [140.211.11.116]) by hel.zones.apache.org (Postfix) with ESMTP id 37BFFC3BE6 for ; Thu, 18 Aug 2011 19:11:27 +0000 (UTC) Date: Thu, 18 Aug 2011 19:11:27 +0000 (UTC) From: "Julian Cable (JIRA)" To: dev@camel.apache.org Message-ID: <96973735.50112.1313694687225.JavaMail.tomcat@hel.zones.apache.org> In-Reply-To: <1226043961.49023.1313670687181.JavaMail.tomcat@hel.zones.apache.org> Subject: [jira] [Commented] (CAMEL-4350) Camel-csv with List has arbitrary column order MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 X-Virus-Checked: Checked by ClamAV on apache.org [ https://issues.apache.org/jira/browse/CAMEL-4350?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13087203#comment-13087203 ] Julian Cable commented on CAMEL-4350: ------------------------------------- I don't have time to try it, but it looks like changing HashMap to LinkedHashMap on lines 25 and 197 of /camel/trunk/components/camel-jdbc/src/main/java/org/apache/camel/component/jdbc/JdbcProducer.java would do the trick. Julian > Camel-csv with List has arbitrary column order > --------------------------------------------------- > > Key: CAMEL-4350 > URL: https://issues.apache.org/jira/browse/CAMEL-4350 > Project: Camel > Issue Type: Improvement > Affects Versions: 2.7.1 > Environment: java 1.6 > Reporter: Julian Cable > Priority: Minor > Fix For: 2.9.0 > > > The following route works but the order of the columns is dependent on the natural ordering of the hashmap. Target systems will have an expectation of the order of the data. > > > > SELECT id, value1, value2 FROM mytable > > > > > > > Either there needs to be a property for csv that allows hash key ordering to be specified, or an option to sort the keys, e.g. > > > > SELECT id as col1, value1 as col2, value2 as col3 FROM mytable > > > > > > -- This message is automatically generated by JIRA. For more information on JIRA, see: http://www.atlassian.com/software/jira