Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to setup "Run if Previous Complete" sessions/batches 1

Status
Not open for further replies.

andornot01

IS-IT--Management
Mar 17, 2003
8
US

In loading a star schema, we need to load the Dimensions before the Fact.

According to the manual, we can configure the Fact session as "Run if Previous Complete" -- Don't start the Fact session if the Dimensions failed to complete. I have not found any instruction on how to set this up.

Please help me figure out how to put this session configuration in place. I am using Informatica 5.1. Thanks


 
Let say you have 4 work flows. Starting with "Extract", then "Dimension Load", then "Facts Load", then ending with "SCD Load".
The last step in the "Extract" workflow is a Command Task that calls a batch file that executes the "Dimension Load" workflow. Then the last step on the "Dimension Load" is another Command Task that calls another batch file that executes the "Facts Load" workflow. And so on.

On the Properties tab of the Command Task you can specify "Run if previous completed". So the Command Task will only calls the batch file to run the next workflow if the last workflow completes successfully.


Your batch files should contain the following:
"C:\Informatica\Informatica PowerMart Server\bin\pmcmd.exe" startworkflow -s informatica_dev01:4001 -u Administrator -p Administrator -f Full_Load_DW_Dimensions

The first line is the path to the "pmcmd.exe"
-s is the name of your server and port
-u is the user name
-p is the password
-f is the name of the next workflow that you're calling

You can do the same thing for incremental run and then just schedule the incremental extract workflow to run on a specific interval. If the first one is succesfull then it'll trigger the next one and so on. Hope that helps.
 
Kublait,

Thank you for the information. I believe you are illustrating the steps in version 6, because I haven't seen the terms "workflow" and "command task" used in version 5.1. Do you happen to know the steps for version 5.1?

I have an additional question re your 4-batch illustration. Was "SCD" meant to be "Slowly changing dimension"? If so, were there specific reasons for it to be after the Fact load instead of before?

 
There are no 'steps' in 5.1, look more closely and you will find the setting in session configuration (edit session)

T. Blom
Information analyst
tbl@shimano-eu.com
 
That is why I am asking for help here: I looked and could not find clear, definitive instructions.

This is what the v5.1 manual says: The Informatica Server marks a batch as failed if one of its sessions is configured to “run if previous completes” and that previous session fails. If you use pmcmd to start the batch, pmcmd returns 1, for failed. …

My confusion is what does “configured” mean in the v5.1 manual cited above. I cannot find any “Run if previous completes” on the v5.1 system. Other than that, I can concoct my own solution as follows:

A. I can put together the script to check the exit code of the previous pmcmd – if not 1 then issue the next pmcmd; else quit.
B. OR, I can, in the spirit of Kublait’s suggestion Edit session > Post-session Commands > On the Success Tab, enter the pmcmd.exe for the next session.

Would these concoctions work?

I still appreciate it if someone would shed more light on what the v5.1 manual means by ‘configured to “run if previous completes”’. What is the step by step to do that?
 
andornot01,
You're right. We're currently using PowerMart 6.1. Does the 5.1 version have "Workflow Manager" ? The Workflow Manager is where I added the Command Task.

To answer your other question. SCD is Slowly Changing Dimension. I've actually configure it to run the same time as the Facts. So you really have to create only 2 batch file. One to trigger the Dimension after the Extract is finish. One to trigger the Facts and SCD after the Dimension is finish.

Sorry I couldn't help more.
 
Kublait,

You helped a lot. Thank you.

I am really intrigued by the idea of putting the SCD_load and Fact_load in the same batch (as compared to putting SCD_load in the same batch as the other Dimensions). Is there some general rationale for this that you would share? And, in that batch, do you run SCD and Fact in sequence or concurrently?
 
andornot01,
We run the Fact and SCD concurrently. I don't think there are any particular other than it was originally set up that way and we just left it.

 
You can find the "Run if previous completed" in session properties in v5.1. Just edit the session and click on log&error handling tab. than check the radio button Run if previous completed. this will solve your purpose.


Let me know if you are still not clear.

Thanks
Ajay
 
Smajay,

Yes! You hit a home run.
I have submitted a vote for you to be TipMaster of week.

Thank you.

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top