Page 1 of 1

Sequential file data(.csv) file with different record format

Posted: Tue Jul 03, 2007 1:00 am
by Shadab_Farooque
I have to load a .csv file with different record format in to Oracle Table.
Each data block should contain one header record and zero to many detail records.
Eg:
A,1,3,date,time
B,1,date,time,seq No,transaction made
B,2,date,time,seq No,transaction made
B,3,date,time,seq No,transaction made

Here 1st record starting with A is the header record which has 3 detail records(starting with B).
Header record has 7 columns and detail record has 12 columns.

What stage should I use as input to load this .csv file in the oracle table.

Re: Sequential file data(.csv) file with different record fo

Posted: Tue Jul 03, 2007 5:06 am
by sachin1
if you are well aware of how many columns are their for your parent and child records, just like 7 columns for parent records and 12 fields for child.

then you can use sequential file stage to read your .CSV file and putting constraints in transformer stage you can Segregate out your parent and child record.

Re: Sequential file data(.csv) file with different record fo

Posted: Tue Jul 03, 2007 5:13 am
by sachin1
if you are well aware of how many columns are their for your parent and child records, just like 7 columns for parent records and 12 fields for child.

then you can use sequential file stage to read your .CSV file and putting constraints in transformer stage you can Segregate out your parent and child record.

Re: Sequential file data(.csv) file with different record fo

Posted: Tue Jul 03, 2007 5:16 am
by sachin1
if you are well aware of how many columns are their for your parent and child records, just like 7 columns for parent records and 12 fields for child.

then you can use sequential file stage to read your .CSV file and putting constraints in transformer stage you can Segregate out your parent and child record.

Posted: Tue Jul 03, 2007 5:33 am
by JoshGeorge
CFF stage?

Re: Sequential file data(.csv) file with different record fo

Posted: Tue Jul 03, 2007 5:43 am
by sachin1
hello ray i am extremely sorry for my multiple posts, some problem with sessions.

Posted: Tue Jul 03, 2007 7:03 am
by thebird
How do you want to load it - only header? header and detail both? or only detail?

In any case, you can use the Sequential Stage and choose the Stage uses filter command option to specify a filter command (using grep command) to read either the header or the detail.

If you want both header and detail - then it makes more sense to read the entire data (header and detail both) in to a transformer and then split these into Header stream and Detail stream (depending on how you want) by using constraints - as suggested above.

Aneesh