Page 1 of 1

Space prefix in decimal value

Posted: Thu Feb 09, 2017 11:28 pm
by mallikharjuna
Hi,

We are using RCP and schema files in our etl jobs. I am extracting data from table and loading in file. I am facing 2 issues

1) space is prefixed for decimal values, when i tried to load in file.
Ex: if value is 10.1 in source then " 10.1 in file, one space before value 10.

2) if source data type is number (6,2) and value is 4.2 then output file having files prefix with zero's and appending with zeros
0004.20

Posted: Fri Feb 10, 2017 6:57 am
by chulett
Both of those are examples of How It Works with numeric values in a flat file. The space is a place holder for the sign (i.e. where the minus sign would go if it was negative) and the leading zeroes are not significant. I know it's not how you want it to look but neither one should be causing a problem when the file is consumed. Are they actually causing a problem?

Using RCP complicates this as normally one would need to target a string and explicitly reformat the decimal output to your liking.

Posted: Fri Feb 10, 2017 9:27 pm
by mallikharjuna
Thanks Chulett

Posted: Sat Feb 11, 2017 8:15 am
by chulett
Still curious if this formatting is actually causing a problem for whatever is consuming the file...

Posted: Sat Feb 11, 2017 9:11 am
by mallikharjuna
We have to send this data to downstream system.I think downstream can handle this data . the question from downstream system is why the file data not exactly same as database.
now it becomes like quality issue.


Thanks
Mallikharjuna Reddy

Posted: Mon Feb 13, 2017 9:14 am
by chulett
I'm going to mark this as Resolved for the moment. If you need more information or are looking for alternatives, please feel free to open this back up and let us know.

Posted: Mon Feb 13, 2017 8:35 pm
by ray.wurlod
The data ARE the same as in the database. Decimal numbers are stored in some kind of binary or packed decimal format.

It's the presentation layers that are different.