Extraction
Moderators: chulett, rschirm, roy
Extraction
I have a series of data coming in for different column fields.How shall I extract values for each field using seq file stage?
chulett wrote:Or maybe you just need to read it as a fixed-width file. Can you post examples please of what you are looking at, before and after?
etc,..
Last edited by India2000 on Fri Sep 24, 2010 8:12 am, edited 2 times in total.
Not sure how you will end up with 5 fields if you read it as a fixed width file
If you know the layout of the file, it should work just fine.
Are you expecting blanks within your data where you intend to just add commas? You can read it as a single column and split them in a transformer stage as well if you want to.
If you know the layout of the file, it should work just fine.
Are you expecting blanks within your data where you intend to just add commas? You can read it as a single column and split them in a transformer stage as well if you want to.
Kris
Where's the "Any" key?-Homer Simpson
Where's the "Any" key?-Homer Simpson
first field is like as I sent in the example..next are fields with tabskris007 wrote:Not sure how you will end up with 5 fields if you read it as a fixed width file :?
If you know the layout of the file, it should work just fine.
Are you expecting blanks within your data where you intend to just add commas? You can read it as a single column and split them in a transformer stage as well if you want to.
-
- Participant
- Posts: 246
- Joined: Mon Jun 30, 2008 3:22 am
- Location: New York
- Contact:
Do you know the exact length of the record? If so as suggested earlier you can read it in a single column. And if you are not sure about the record length and if you are sure you have a line terminator, you can define a column like varchar 999 and read it as a delimited file with '000' in the delimiter and the quote character and split it in a transformer
Arun
Again, if you can provide an example for people to you help you correctly, you will get an answer fast.India2000 wrote: first field is like as I sent in the example..next are fields with tabs
As Craig had asked, provide a sample record for all the 20 fields that are coming in so that we can chip in with our suggestions. It's hard for us to come up with an answer that works for you when you provide bits and pieces of your actual case.
Kris
Where's the "Any" key?-Homer Simpson
Where's the "Any" key?-Homer Simpson
kris007 wrote:Again, if you can provide an example for people to you help you correctly, you will get an answer fast.India2000 wrote: first field is like as I sent in the example..next are fields with tabs
As Craig had asked, provide a sample record for all the 20 fields that are coming in so that we can chip in with our suggestions. It's hard for us to come up with an answer that works for you when you provide bits and pieces of your actual case.
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
Import the table definition. Specify fixed width. Specify column widths of 5,1,6 (or whatever is correct). Define "proper" column names. Use that table definition for the Format as well as the Columns tab. All will be well.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.