load two diff text files using single sequential file stage
Moderators: chulett, rschirm, roy
load two diff text files using single sequential file stage
Hi Folks,
I'm trying to load two different text files(same columns) to a table in server job which loads data from a sequential file stage(source) to a ODBC stage(target) and I'm having a little difficulty that I hope someone can help me with.
Background::
I have tried with 'job sequencing' in which I hv used same server job 2 times in 1 st activity i have given filepath of 1st file in Enviornment variable and in 2nd job activity file path of another file.
It works fine.
QUESTION::
I want to load the two different files "Parallely" not one after one.
How do I do that??
Any ideas are most welcome, thanks...
I'm trying to load two different text files(same columns) to a table in server job which loads data from a sequential file stage(source) to a ODBC stage(target) and I'm having a little difficulty that I hope someone can help me with.
Background::
I have tried with 'job sequencing' in which I hv used same server job 2 times in 1 st activity i have given filepath of 1st file in Enviornment variable and in 2nd job activity file path of another file.
It works fine.
QUESTION::
I want to load the two different files "Parallely" not one after one.
How do I do that??
Any ideas are most welcome, thanks...
-
- Participant
- Posts: 232
- Joined: Fri Sep 30, 2005 4:52 am
- Contact:
Re: load two diff text files using single sequential file st
I assume that as per subject of the post given by you that you have two different sequential files and want to load the file to a table using a single sequential file stage.Amar_nath wrote:Hi Folks,
I'm trying to load two different text files(same columns) to a table in server job which loads data from a sequential file stage(source) to a ODBC stage(target) and I'm having a little difficulty that I hope someone can help me with.
Background::
I have tried with 'job sequencing' in which I hv used same server job 2 times in 1 st activity i have given filepath of 1st file in Enviornment variable and in 2nd job activity file path of another file.
It works fine.
QUESTION::
I want to load the two different files "Parallely" not one after one.
How do I do that??
Any ideas are most welcome, thanks...
In this case,You can cat the two files to make it as a single file and use the sequential file stage to load the database.
Make your DataStage load job into a multinstance job, start two concurrent instances of this job, each using a different source file passed in as a parameter and you have your solution.
<a href=http://www.worldcommunitygrid.org/team/ ... TZ9H4CGVP1 target="WCGWin">
</a>
</a>
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
Start them at the same time, but with different invocation IDs.
An invocation ID may be any string.
The file name would need to be a job parameter, which would obviously have a different value in each invocation.
However, if the files are not identical in record layout, multi-instance jobs are not the solution. You need separate jobs, or separate streams in the one job. It can be done with one Sequential File stage, but this stage requires two links, one for each file. The metadata on each link will be different from on the other link.
An invocation ID may be any string.
The file name would need to be a job parameter, which would obviously have a different value in each invocation.
However, if the files are not identical in record layout, multi-instance jobs are not the solution. You need separate jobs, or separate streams in the one job. It can be done with one Sequential File stage, but this stage requires two links, one for each file. The metadata on each link will be different from on the other link.
Code: Select all
stream1 ----> Sequential
stream2 ----> File Stage
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.
Amar - instances are designed so that they can run at the same time. Can you tell us what problems you are having when you try to run them at the same time?
<a href=http://www.worldcommunitygrid.org/team/ ... TZ9H4CGVP1 target="WCGWin">
</a>
</a>
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
ArndW,
I have created 2 job invocation's in DS Director ,in job status it shows me
myjob Validated OK
myjob.invo1 Validated OK (parameter is file1's path)
myjob.invo2 Validated OK (parameter is file2's path)
now i want to run these 2 invocations . If i click on one of these then only run is active if i select both of them then its not.
how to do that
I have created 2 job invocation's in DS Director ,in job status it shows me
myjob Validated OK
myjob.invo1 Validated OK (parameter is file1's path)
myjob.invo2 Validated OK (parameter is file2's path)
now i want to run these 2 invocations . If i click on one of these then only run is active if i select both of them then its not.
how to do that
-
- Participant
- Posts: 232
- Joined: Fri Sep 30, 2005 4:52 am
- Contact:
Amar_nath wrote:ArndW,
I have created 2 job invocation's in DS Director ,in job status it shows me
myjob Validated OK
myjob.invo1 Validated OK (parameter is file1's path)
myjob.invo2 Validated OK (parameter is file2's path)
now i want to run these 2 invocations . If i click on one of these then only run is active if i select both of them then its not.
how to do that
You need to create sequnce to run this job or you need to schedule this job ...
Thanks,
Anupam
Create a sequence with 2 job activity stages; put the correct instance name (any names will do as long as they are different) and the correct parameter file name, compile and run.
<a href=http://www.worldcommunitygrid.org/team/ ... TZ9H4CGVP1 target="WCGWin">
</a>
</a>