Return-Path: Delivered-To: apmail-commons-user-archive@www.apache.org Received: (qmail 85596 invoked from network); 10 Sep 2008 14:49:20 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 10 Sep 2008 14:49:20 -0000 Received: (qmail 64763 invoked by uid 500); 10 Sep 2008 14:49:13 -0000 Delivered-To: apmail-commons-user-archive@commons.apache.org Received: (qmail 64613 invoked by uid 500); 10 Sep 2008 14:49:13 -0000 Mailing-List: contact user-help@commons.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: "Commons Users List" Delivered-To: mailing list user@commons.apache.org Received: (qmail 64602 invoked by uid 99); 10 Sep 2008 14:49:13 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 10 Sep 2008 07:49:12 -0700 X-ASF-Spam-Status: No, hits=1.2 required=10.0 tests=SPF_NEUTRAL X-Spam-Check-By: apache.org Received-SPF: neutral (athena.apache.org: local policy) Received: from [195.242.168.1] (HELO mgate.ops.co.at) (195.242.168.1) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 10 Sep 2008 14:48:15 +0000 Received: from smtp.ops.co.at (smtp.int.ops.co.at [172.27.0.4]) by mgate.ops.co.at (OPS Mail Gateway - authorized use only - NO UCE/UBE C=AT L=VIE) with ESMTP id 32662AFE51 for ; Wed, 10 Sep 2008 16:48:46 +0200 (CEST) Received: by smtp.ops.co.at (Postfix, from userid 65534) id 11B596E023F; Wed, 10 Sep 2008 16:48:46 +0200 (CEST) Received: from [172.27.1.104] (lints2.int.ops.co.at [172.27.1.104]) by smtp.ops.co.at (Postfix) with ESMTP id 28B3A6E0234 for ; Wed, 10 Sep 2008 16:48:45 +0200 (CEST) Message-ID: <48C7DE4C.2060707@apache.org> Date: Wed, 10 Sep 2008 16:48:44 +0200 From: Simon Kitching User-Agent: Thunderbird 2.0.0.12 (X11/20071114) MIME-Version: 1.0 To: Commons Users List Subject: Re: Scripting Suggestion? References: In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Checker-Version: SpamAssassin 2.64 (2004-01-11) on smtp.ops.co.at X-Spam-Level: X-Virus-Checked: Checked by ClamAV on apache.org X-Old-Spam-Status: No, hits=-4.4 required=7.0 tests=AWL,BAYES_00,RATWR10_MESSID, SARE_TOCC_USER autolearn=no version=2.64 Patrick.Grimard@xtl.com schrieb: > I figured out an alternative. Primarily, all source data needs to get truncated > to fit the target columns. The only source data I might need to do something > tricky with appears to be java.sql.Timestamp values. One particular column in > my target table that is a String data type that holds a date value wants to see > the dates as YYYY-MM-DD-HH-MM-SS. So when I'm getting values from my source > data ResultSet, rather than just using the getString() method, I'm using the > getObject() method instead. > > Doing it that way, I'm able to test the returned Object to see what class it's > an instance of. This allows me to convert the data to a string and do any other > conversions that are specific to the source data type. In the case of my date > above, I'm replacing the " " (space) character between the data and time with a > "-" (dash) and dropping the nanos. That gives me the converted value I need. > So no fancy scripting needed in my XML. > Ok, thanks for letting us know. And good luck with your project. And by the way, if you have any future questions for this list then please put the name of the commons project in the subject line, eg [digester] scripting suggestion Regards, Simon --------------------------------------------------------------------- To unsubscribe, e-mail: user-unsubscribe@commons.apache.org For additional commands, e-mail: user-help@commons.apache.org