mobileNavlogo
headerlogo

Working with Tasks in Informatica

06 October, 2020

Ratings

Related Blogs

 

Timer task  - Informatica

The timer task allows the integration service to wait for a specified period 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 the present workflow.

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 workflow designer
  • From workflow, menu select create
  • Enter the workflow name w-timer-date-variable
  • Selects the variables tab from tools bar click on add a new variable
Name Data type
$$start- time Date/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

 

If you want to enrich your career and become a professional in Informatica, then visit Tekslate - a global online training platform: "Informatica Training" This course will help you to achieve excellence in this domain.

 

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

2. Stand alone email task

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

51

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

Double click on the email task select the properties tab

Attribute Value
Email user name Srinu@yahoo.com
Email subject Session task succeeded
Email test Session 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 within 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 allocated only within the content of the session, i.e., post-session email task

Procedure

  • From the 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
Task Type Value
On successful email Reusable On-success-email
On failure email Reusable On-failure-email

Click on edit  to edit the success email

Attribute Value
Email user Xyz
Email subject %E
Email text %g/n%L/n%R

Note:

%E defines session status
%g Attach session log
%L No of records loaded
%R No of records rejected
%b Session start time
%E defines session status
%g Attach session log
%L No of records loaded
%R No of records rejected
%b Session start time
%c Session completion time
%s Session name
%w Workflow name
%m Mapping name
%v Integration service name
%d Repository name
%n Newline character
%J tab

Click on apply and click on ok

  Similarly defines failure email task

Click on apply and click ok

Control task

   The control task is used to after the normal processing of the workflow, they can stop, abort, fail any workflow 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 returns the status of the script execution it returns passed or fails
  3. Script error: the port is of type output port which returns an error message when the script fails

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 name Data type Precession
Script name String 500

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 name Data type Precession
Script result String 15
Script error string 1500

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

Type Value
Relational Batch 4pm-Trg-writer

Click on apply and click ok

For in-depth understanding of Informatica click on

About Author
Authorlogo
Name

TekSlate

Author Bio

TekSlate is the best online training provider in delivering world-class IT skills to individuals and corporates from all parts of the globe. We are proven experts in accumulating every need of an IT skills upgrade aspirant and have delivered excellent services. We aim to bring you all the essentials to learn and master new technologies in the market with our articles, blogs, and videos. Build your career success with us, enhancing most in-demand skills .