• USA : +1 973 910 5725
  • INDIA: +91 905 291 3388
  • info@tekslate.com
  • Login

Working with Tasks in Informatica

Timer task  – Informatica

The timer task allows the integration service to wait for a specified period of time to start the next task

The timer task operation in three different modes

  1. absolute time
  2. relative time
  3. date time variant

Absolute time

The user can specify the date and time to start the timer from

Relative time

The timer task can start the timer from the start time of the timer task the start time of the workflow (work let) or from the start time of present work flow.

Date time variable

The user can provide a variable that lets the time task know when to start the timer from

Timer task absolute time

49

 double click the timer task select the timer tab

Select absolute type

Specify the date and time

Click on apply and click ok

Timer task – date time variable

  • From tools menu select work flow designer
  • From work flow menu select create
  • Enter the work flow name w-timer-date-variable
  • Selects the variables tab from tools bar click on add a new variable
NameData type
$$start- timeDate/time

Default value: 03/25/2009 03:27:10

Mm dd yyyy hh mm ss

Click on apply and click ok

Double click the timer task,

Select use this work flow variable click on ellipses

Select the variable click ok

Click on copy and click ok

Email task in Informatica

                   The email tasks send and email notification message during workflow run

An email task can be configured as  a standalone email task

50

  1. Post session email task

An email task can be used with the link conditions to notify the successes or failure of the prior task

  1. Stand alone email task

                 It can be created any ware in the work flow it can be used with link condition

51

Define the link condition $S10.status= succeeded and S20.status=succeeded

Double click on email task select the properties tab

AttributeValue
Email user nameSrinu@yahoo.com
Email subjectSession task succeeded
Email testSession task success

Click on apply and click ok

Note:To work with the email task configure the email server with integration service

Working with post session email task

An email task is designed with in the session task

  • An email task sends the email notifications on success (or) the failure of the session
  • An email variable can be declared with the post session email task

Note:Email variables are allocate only within the content of session, i.e. post session email task

Procedure

  • From tools menu select task developer, from task menu select create
  • Select the task type email, enter the name on-success-email
  • Click on create and done
  • Similarly create an email task with name on-failure-email
  • Double click the session (S10), selects the components tab
TaskTypeValue
On successful emailReusableOn-success-email
On failure emailReusableOn-failure-email

Click on edit  to edit the success email

AttributeValue
Email userXyz
Email subject%E
Email text%g/n%L/n%R

Note:

%Edefines session status
%gAttach session log
%LNo of records loaded
%RNo of records rejected
%bSession start time
%Edefines session status
%gAttach session log
%LNo of records loaded
%RNo of records rejected
%bSession start time
%cSession completion time
%sSession name
%wWork flow name
%mMapping name
%vIntegration service name
%dRepository name
%nNew line character
%Jtab

Click on apply and click on ok

  Similarly defines failure email task

Click on apply and click ok

Control task

   Control task is used to after the normal processing of the work flow, they can stop, abort, fail any work flow or work let

52

SQL-transformation-script mode

When you configure the SQL transformation with the script mode it executes SQL queries “from external text fails”

When you configure the SQL transformation with the script mode it is created with three difficult codes

  1. Script name: the port is of type input port which receives the name of the script file
  2. Script-result: the port is of type output port which return the status of the script execution it returns passed or fail
  3. Script error: the port is of type output port which returns an error message when the script fail
Inclined to build a profession as Informatica Developer? Then here is the blog post on Informatica Training Online.

SQL.txt

Create table Dim-employee-SALES (emp no (4), ename varchar (20), sal.number(7,2), dept no number (4))

External file (script.TXT)

  • Open the note pad type the path of the script file as follows

c:/SQL/SQL.txt

Share the file with the extension script.txt

Step(1)

Creation of source definition

  • From tool menu select source analyzer
  • From source menu select create
  • Enter the name script, select the database type flat file
  • Click on create and done
  • Double click the source definition, select the columns tab
Column nameData typePrecession
Script nameString500

Click on apply and click ok

From repository menu click on save

Step (2)

Creation of target definition

  • From tools menu select target designer
  • From targets menu selects create
  • Enter the target name script-result
  • Select the database type flat file
  • Click on create and done
  • Double click the target definition select the columns tab
Column nameData typePrecession
Script resultString15
Script errorstring1500

Click on apply and click ok

STEP (3)

  • Create a mapping with the name m-SQL-script-mode
  • Drop the source and target definition
  • From transformation menu selects create
  • Select the transformation action type SQL
  • Enter the name SQL click on create, double click on SQL T/R
  • Select the script mode, select the database type oracle, click ok click on done
  • From source qualifier connect the port to SQL T/R
  • From SQL T/R connects the ports to target
  • From repository menu click on save
  • Create a session with the name s-m-script mode
  • Double click session select the mapping tab
  • From left pane select SQL
  • In a properties session set the following attributes
  • Source file directory                                                                                       c:/ batch 4pm

Source file name                                                                                              script-result . txt

From left pane select the target

Output file directory                                                                                      c:/ batch 4pm

Output file name                                                                                             script.txt

From left pane select the SQL T/R

Set the following connection

TypeValue
RelationalBatch 4pm-Trg-writer

Click on apply and click ok

For indepth understanding of Informatica click on

Summary
Review Date
Reviewed Item
Working with Tasks in Informatica
Author Rating
5

“At TekSlate, we are trying to create high quality tutorials and articles, if you think any information is incorrect or want to add anything to the article, please feel free to get in touch with us at info@tekslate.com, we will update the article in 24 hours.”

1 Responses on Working with Tasks in Informatica"

  1. Zuberia says:

    Hi sruthi, you have done excellent work..

Leave a Message

Your email address will not be published. Required fields are marked *

Site Disclaimer, Copyright © 2016 - All Rights Reserved.

Support


Please leave a message and we'll get back to you soon.

I agree to be contacted via e-mail.