Hi,
I am trying to read the seq file ( txt ). from the parellel job.
I have to write to oracle table.
Txt file - 1 line is header which i have to write in table 1
and from 2nd lines are the data which I have to write in the table 2
and 3th line is tail which suppose to go to table 3.
eg. of the seq text file.
CUST|20091222
1362605|16957|34|4|0|16177|Ninth |37229|Nashville
COUT|10|20091222
I am using Sequential_File to read the file. from there I am trying to write it to 3 other tables.
Do not know how to read header part ( 1st line )and middle part ( other lines ) and tail part to write it in the tables
I am using win xp , orcale 9i
Pls assits.
Thanks
How to read Seq file in parallel job to wirte different tabl
Moderators: chulett, rschirm, roy
Re: How to read Seq file in parallel job to wirte different
Include Transform Stage, In Transform stage you can spilit output records based on the condition.Selva_dwh wrote:Hi,
I am trying to read the seq file ( txt ). from the parellel job.
I have to write to oracle table.
Txt file - 1 line is header which i have to write in table 1
and from 2nd lines are the data which I have to write in the table 2
and 3th line is tail which suppose to go to table 3.
eg. of the seq text file.
CUST|20091222
1362605|16957|34|4|0|16177|Ninth |37229|Nashville
COUT|10|20091222
I am using Sequential_File to read the file. from there I am trying to write it to 3 other tables.
Do not know how to read header part ( 1st line )and middle part ( other lines ) and tail part to write it in the tables
I am using win xp , orcale 9i
Pls assits.
Thanks
Sivakumar
Read the record as a single long string. Break out the first field (various ways to do that) and direct your output based on the content of that first field: 'CUST', 'COUT' or none of the above. Colum Inport and/or Filter stages should be useful here.
-craig
"You can never have too many knives" -- Logan Nine Fingers
"You can never have too many knives" -- Logan Nine Fingers
-
- Participant
- Posts: 3337
- Joined: Mon Jan 17, 2005 4:49 am
- Location: United Kingdom
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
Use a Sequential File stage with metadata for the detail rows. Set up a reject link, which will capture the header and trailer rows. Downstream on the reject link use Column Import stages to re-parse these rows.
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.