1.COMMAND TASK IN INFORMATICA IS USED TO RUN THE SHELL/UNIX COMMANDS DURING THE WORKFLOW.
2. WE CAN SPECIFY UNIX COMMANDS IN THE COMMAND TASK TO REMOVE REJECTED FILES,FTP FILES,CREATING FILES,COPY A FILE
AND ARCHIVE A FILE ETC...
3. WE CAN USE ANY VALID UNIX COMMAND OR SHELL SCRIPT FOR UNIX SERVERS,OR ANY VALID DOS OR BATCH FILE FOR
WINDOWS SERVERS.
TWO WAYS WE USE IT:
A) STANDALONE COMMAND TASK: WE CAN USE A COMMAND TASK ANYWHERE IN THE WORKFLOW OR WORKLET TO RUN SHELL COMMANDS.
TASKS->CREATE->CHOOSE COMMAND->NAME IT.
THIS TASK WE CAN USE 1. DIRECTLY 2. BY SELECTING TYPE (REUSABLE)-->SPECIFY COMMAND
UNDER COMMANDS->WE WRITE COMMANDS
1. ONE BY ONE COMMAND IT WILL EXECUTE IN THE ORDER WE HAVE SPECIFIED
NOTE:
ALTHOUGH ONE COMMAND FAILS IT WILL CONTINUE EXECUTION AND FINISH REMAINING COMMANDS EXECUTION AND KEEPS IN SUCCESS STATE.
GOTO PROPERTIES AND CHECK "FAIL TASK IF ANY COMMAND FAILS"--THEN ONE COMMAND FAILS COMMAND FAILS
B) IN THE SESSTION PRE SESSION/POST SESSION SUCCESS /POST SESSION FAILURE
NON REUSABLE-->TYPE COMMAND
2. PRE AND POST SESSION COMMAND
CALLING A COMMAND TASK AS THE PRE OR POST SESSION SHELL COMMAND FOR A SESSION TASK.
WE CAN CALL THEM IN "COMPONENTS TAB" OF THE SESSION.WE CAN RUN THEM IN PRE SESSION/POST SESSION SUCCESS/POST SESSION FAILURE
COMMAND.BY SELECTING THE TASK "TYPE" AND ITS VALUE.
THREE TYPES--NONE,REUSABLE,NON REUSABLE
PRACTICALS:
SCENARIO 1: DELETE FILE BEFORE CREATING A NEW FILE IN THE SAME LOCATION
START->COMMAND TASK->SESSION
COMMAND TASK-->ERASE /DEL filePATH
SCENARIO 2: TAKE BACK UP OF FILE ONCE IT IS CREATED
START->SESSION
SESSION->COMPONENTS->POST SESSION SUCCESS-> NON REUSABLE->COPY filePATH1 filePATH2
SCENARIO 3: 1 AND 2 IN SINGLE AREA
START->SESSION
SESSION->COMPONENTS TAB
PRE SESSION->REUSABLE->COMMAND TASK NAME SPECIFY
POST SESSION->NON REUSABLE-->COPY filePATH1 filePATH2
2. WE CAN SPECIFY UNIX COMMANDS IN THE COMMAND TASK TO REMOVE REJECTED FILES,FTP FILES,CREATING FILES,COPY A FILE
AND ARCHIVE A FILE ETC...
3. WE CAN USE ANY VALID UNIX COMMAND OR SHELL SCRIPT FOR UNIX SERVERS,OR ANY VALID DOS OR BATCH FILE FOR
WINDOWS SERVERS.
TWO WAYS WE USE IT:
A) STANDALONE COMMAND TASK: WE CAN USE A COMMAND TASK ANYWHERE IN THE WORKFLOW OR WORKLET TO RUN SHELL COMMANDS.
TASKS->CREATE->CHOOSE COMMAND->NAME IT.
THIS TASK WE CAN USE 1. DIRECTLY 2. BY SELECTING TYPE (REUSABLE)-->SPECIFY COMMAND
UNDER COMMANDS->WE WRITE COMMANDS
1. ONE BY ONE COMMAND IT WILL EXECUTE IN THE ORDER WE HAVE SPECIFIED
NOTE:
ALTHOUGH ONE COMMAND FAILS IT WILL CONTINUE EXECUTION AND FINISH REMAINING COMMANDS EXECUTION AND KEEPS IN SUCCESS STATE.
GOTO PROPERTIES AND CHECK "FAIL TASK IF ANY COMMAND FAILS"--THEN ONE COMMAND FAILS COMMAND FAILS
B) IN THE SESSTION PRE SESSION/POST SESSION SUCCESS /POST SESSION FAILURE
NON REUSABLE-->TYPE COMMAND
2. PRE AND POST SESSION COMMAND
CALLING A COMMAND TASK AS THE PRE OR POST SESSION SHELL COMMAND FOR A SESSION TASK.
WE CAN CALL THEM IN "COMPONENTS TAB" OF THE SESSION.WE CAN RUN THEM IN PRE SESSION/POST SESSION SUCCESS/POST SESSION FAILURE
COMMAND.BY SELECTING THE TASK "TYPE" AND ITS VALUE.
THREE TYPES--NONE,REUSABLE,NON REUSABLE
PRACTICALS:
SCENARIO 1: DELETE FILE BEFORE CREATING A NEW FILE IN THE SAME LOCATION
START->COMMAND TASK->SESSION
COMMAND TASK-->ERASE /DEL filePATH
SCENARIO 2: TAKE BACK UP OF FILE ONCE IT IS CREATED
START->SESSION
SESSION->COMPONENTS->POST SESSION SUCCESS-> NON REUSABLE->COPY filePATH1 filePATH2
SCENARIO 3: 1 AND 2 IN SINGLE AREA
START->SESSION
SESSION->COMPONENTS TAB
PRE SESSION->REUSABLE->COMMAND TASK NAME SPECIFY
POST SESSION->NON REUSABLE-->COPY filePATH1 filePATH2
No comments:
Post a Comment