Hi All,
I am reading binary file(EBCDIC format) through CFF stage and writing to a sequential file in "^" delimited which will be consumed by downstream application. The down stream application will read the file and load as is into a Hive table in HDFS and all the fields type are string.
So When I read a packed decimal field through CFF stage, in following transformer, I am using Decimal To String(Link.Col,"suppress_zero") and setting the target column type as Varchar in sequential file keeping the same width as that of input decimal field.
So this is converting, -00000045.10 to -45.1 and -0000000001.00 to -1. My decimal field is 17,2 so I am keeping target field as Varchar 17. is that correct?
Secondly, there are some Decimal field in source without scale ie Decimal 3, Decimal 7 etc.
There I found issue while using above DecimalTo String function hence I used AsInteger(Ln.Column) and set the target datatype as Varchar.
So this transformation gives me following result:
088 converted to 88
008 converted to 8
My qs is , is my rule correct? As the target is sequential file and other application will load the data as string so is my above conversion rule correct?
Decimal to string conversion
Post questions here relative to DataStage Enterprise/PX Edition for such areas as Parallel job design, Parallel datasets, BuildOps, Wrappers, etc.
Moderators: chulett, rschirm, roy
Return to “IBM<sup>®</sup> DataStage Enterprise Edition (Formerly Parallel Extender/PX)”
Jump to
- Moderators' Choice
- ↳ Editor's BLOG Corner
- ↳ Ask the Experts! - Dads and Grads
- ↳ DSXchange Testimonials
- ↳ Cognos (IBM BI)
- FAQs
- ↳ FAQs
- ↳ FAQ Discussion
- DataStage
- ↳ General
- ↳ IBM<sup>®</sup> Infosphere DataStage Server Edition
- ↳ IBM<sup>®</sup> DataStage Enterprise Edition (Formerly Parallel Extender/PX)
- ↳ Archive of DataStage Users@Oliver.com
- IBM<sup>®</sup>Infosphere Products<sup></sup>
- ↳ Business Glossary
- Suggestions
- ↳ Site/Forum
- ↳ Enhancement Wish List
- Consulting
- ↳ Talent
- ↳ Looking for Talent
- Support
- ↳ Parameter Manager
- ↳ Compile All Plus
- Usergroup Forums
- ↳ Usergroup Central Forum
- ↳ Heartland Usergroup Forum
- The Written Word
- ↳ Articles, White Papers and Tips and Tricks
- ↳ Product Documentation
- Third Party Applications
- ↳ Third Party Applications
- Product Derivatives
- ↳ Functions
- ↳ Routines
- ↳ Jobs
- ↳ Logs
- Tools
- ↳ Tools Forum
- Category
- ↳ Infosphere Master Data Management
- ↳ Data Quality Best Practices
- ↳ IBM QualityStage
- ↳ Information Analyzer (formerly ProfileStage)
- ↳ IBM<sup>®</sup> SOA Editions (Formerly RTI Services)
- ↳ IBM<sup>®</sup> DataStage TX
- ↳ BI
- ↳ Data Integration