Unix Shell Scripting – Why DWH Professionals to Learn ?

There are a lot of advantages we use UNIX shell scripting in Informatica:

Lot many things we can do with UNIX scripting:

Before processing the flatfile for informatica,u can check data according to the requirement specified(like Header,Trailer data or how many details records etc).

2.Send mail to conern person,if the files having issues against the requirement.

3.Using pmcmd command,u can run the workflow if all are fine(eg.start the workflow,Abort the workflow etc).In 8.6 we have extra option for creating folder,label,user using infacmd.U can check the COMMAND REFERENCE under administrator Guide in informatica help.

4.After each successful run of Session in informatica,u can use unix with combination of Oracle to Delete,Update,insert,select for different scenarios either in pre,post session command or using Command task to call the Shell script.

5.For e.g to remove,move,rename,compress the cache,log,parameter,dat file u can use unix shell script.

6.Dynamically u can create Paramare files,Zero byte files(no data),Giving permission to the file using Chmod,Chown etc.

Some more points:

Informatica server can be installed on Windows and Unix OS. But in most of the projects you will see that Informatica server is installed on a Unix OS because of the advantage that Unix has over Windows OS as an OS at the enterprise level. Now since your Informatica server is running on Unix box you need to understand how to schedule jobs. how to access unix directories and etc to use the informatica system efficiently on the Unix box.

You can use PMCMD command to execute a workflow and you can create a shell script with all your processing logic and a reference to PMCMD command to execute your workflow. You will also need to some of the basic file handling commands to play with Source files and read/analyze the bad files which are created at Unix side.

Remember it is not a must to know Unix to develop Informatica mappings but if you know Unix commands and shell script it will help you in getting a grip on what you are doing and you may be able to do things in a better way.