Page 1 of 1

Decimal representation as Double datatype in xml stage

Posted: Wed May 30, 2012 11:26 pm
by basu.ds
Hi ,
I have a source field as decimal data type value is 899.00 but in xml stage datatype is double and value represented in xml as 899 my client expecting as 899.00 with double datatype Is this possible with out changing double data tyepe in xml ? please advise

Posted: Thu May 31, 2012 2:13 am
by BI-RMA
Double datatype is a floating-point numeric datatype. It will show as many decimal digits as needed.

In an xsd-definition the only way to get a fixed format for numeric values is to set the result-datatype to string.

Posted: Thu May 31, 2012 6:07 am
by eostic
are you using the XML Stage or the xmlOutput Stage?

Ernie

Posted: Mon Jun 04, 2012 7:49 am
by basu.ds
xml input stage

Posted: Mon Jun 04, 2012 8:51 am
by eostic
Then treat the data as character, which is what it is. Don't let the software do any kind of interpretation for you. Take 100% control. Make all of your columns char or varchar, pull out the pure strings from the xml tags......

...focus on the "parsing", and get the strings "as they are" in the document.....and then downstream, if you need more zeros, add them....or take them away.........if you need to do conversions and then formally "import" it into the framework and turn it into a real double if this is EE, then do that in a transformer or other stage using your favorite technique.

With xmlInput, focus on the parsing.

Ernie