Tuesday, 18 November 2014

Email Task - Sample create

Creating a sample Email Task:

You can create Email tasks in the Task Developer, Worklet Designer, and Workflow Designer.

1. In the Task Developer, click Tasks > Create.
 
2. The Create Task dialog box appears. Select an Email task and enter a name for the task. Click Create. 
 
3. The Workflow Manager creates an Email task in the workspace, Click Done. 
 
4. Select the email task and Double-click on it to edit --> Go to the Properties tab. 
 
a) Enter the email address of the mail recipient in the Email User Name field.
b) Enter the subject of the email in the Email Subject field Or you can leave this field blank.
c) Click the Open button in the Email Text field to open the Email Editor.

5. Enter the text of the email message in the Email Editor. You can use service, service process, workflow, and worklet variables in the email text. Or, you can leave the Email Text field blank.
  
Note:
1. You can incorporate format tags and email variables in a post-session email. However, you cannot add them to an Email task outside the context of a session.
2. The Integration Service does not limit the type or size of attached files. However, since large attachments can cause problems with the email system, avoid attaching excessively large files, such as session logs generated using verbose tracing. The Integration Service generates an error message in the email if an error occurs attaching the file.

The following table describes the email variables that you can use in a post-session email:
Email Variable
Description
%a<filename>
Attach the named file. The file must be local to the Integration Service. The following file names are valid: %a<c:\data\sales.txt> or %a</users/john/data/sales.txt>. The email does not display the full path for the file. Only the attachment file name appears in the email.
Note: The file name cannot include the greater than character (>) or a line break.
%b
Session start time.
%c
Session completion time.
%d
Name of the repository containing the session.
%e
Session status.
%g
Attach the session log to the message.
%i
Session elapsed time.
%l
Total rows loaded.
%m
Name of the mapping used in the session.
%n
Name of the folder containing the session.
%r
Total rows rejected.
%s
Session name.
%t
Source and target table details, including read throughput in bytes per second and write throughput in rows per second.
%u
Repository user name.
%v
Integration Service name.
%w
Workflow name.
%y
Session run mode (normal or recovery).
%z
Workflow run instance name.
Note: The Integration Service ignores %a, %g, and %t when you include them in the email subject. Include these variables in the email message only.

The following table lists the format tags you can use in an Email task:
Formatting 
Format Tag 
tab
\t
new line
\n

6. Click OK twice to save the changes.

Now we have create re-usable command task and now we need to use this in session inside the workflow. (Open the workflow or worklet where you want to use this command task).

7. Select the session in the workspace, double click to edit and go to the components tab.
 
Note:
  1. On Success E-Mail: Send an email alter on session succeeded.
  2. On Failure E-Mail: Send an email alter on session failure.
8. Select Task as On Success/Failure E-Mail, Type as Reusable/Non-reusable and Click the Open button in the Email Text field to open the Email Editor
9. Click on 'OK'.
 
Note:

If you want to modify anything in the email click on edit icon and modify it.
 

Email Task

We can send email to designated recipients when the Integration Service runs a workflow.

For Example: If you want to track how long a session takes to complete, you can configure the session to send an email containing the time and date the session starts and completes. Or, if you want the Integration Service to notify you when a workflow suspends, you can configure the workflow to send email when it suspends.

To send email when the Integration Service runs a workflow, perform the following steps:
  • Configure the Integration Service to send email. Before creating Email tasks, we need configure the Integration Service to send email (Administrator will config).
  • Create Email tasks. Before you can configure a session or workflow to send email, you need to create an Email task.
  • Configure sessions to send post-session email. You can configure the session to send an email when the session completes or fails. You create an Email task and use it for post-session email.
  • Configure workflows to send suspension email. You can configure the workflow to send an email when the workflow suspends. You create an Email task and use it for suspension email.
The Integration Service sends the email based on the locale set for the Integration Service process running the session.

We can use parameters and variables in the email user name, subject, and text. For Email tasks and suspension email, you can use service, service process, workflow, and worklet variables. For post-session email, you can use any parameter or variable type that you can define in the parameter file. For example, you can use the $PMSuccessEmailUser or $PMFailureEmailUser service variable to specify the email recipient for post-session email.

Working with Email Tasks
We can send email during a workflow using the Email task on the Workflow Manager. We can create reusable Email tasks in the Task Developer for any type of email. Or, we can create non-reusable Email tasks in the Workflow and Worklet Designer.

Use Email tasks in any of the following locations:
  • Session properties. You can configure the session to send email when the session completes or fails.
  • Workflow properties. You can configure the workflow to send email when the workflow is interrupted.
  • Workflows or worklets. You can include an Email task anywhere in the workflow or worklet to send email based on a condition you define.
Using Email Tasks in a Workflow or Worklet
We can use Email tasks anywhere in a workflow or worklet. For example, we might configure a workflow to send an email if a certain number of rows fail for a session.
For example, we may have a Session task in the workflow and you want the Integration Service to send an email if more than 20 rows are dropped. To do this, you create a condition in the link, and create a non-reusable Email task. The workflow sends an email if the session fails more than 20 rows are dropped.

Working with Post-Session Email
We can configure a session to send email when it fails or succeeds. We can create separate email tasks for success and failure email.

The Integration Service sends post-session email at the end of a session, after executing post-session shell commands or stored procedures. When the Integration Service encounters an error sending the email, it writes a message to the Log Service. It does not fail the session.

We can specify a reusable Email that task you create in the Task Developer for either success email or failure email. Or, we can create a non-reusable Email task for each session property. When you create a non-reusable Email task for a session, you cannot use the Email task in a workflow or worklet.

We cannot specify a non-reusable Email task you create in the Workflow or Worklet Designer for post-session email.

We can use parameters and variables in the email user name, subject, and text. Use any parameter or variable type that you can define in the parameter file. For example, we can use the service variable $PMSuccessEmailUser or $PMFailureEmailUser for the email recipient. Ensure that you specify the values of the service variables for the Integration Service that runs the session. You can also enter a parameter or variable within the email subject or text, and define it in the parameter file.

Email Variables and Format Tags
We can use email variables and format tags in an email message for post-session emails. We can use some email variables in the subject of the email. With email variables, we can include important session information in the email, such as the number of rows loaded, the session completion time, or read and write statistics. You can also attach the session log or other relevant files to the email. Use format tags in the body of the message to make the message easier to read.

Note: The Integration Service does not limit the type or size of attached files. However, since large attachments can cause problems with the email system, avoid attaching excessively large files, such as session logs generated using verbose tracing. The Integration Service generates an error message in the email if an error occurs attaching the file.

Tasks Overview

We can create reusable tasks in the Task Developer. Or, create and add tasks in the Workflow or Worklet Designer as you develop the workflow.

The following table summarizes workflow tasks available in Workflow Manager:
Task Name
Tool
Reusable
Description
Assignment
Workflow Designer 
Worklet Designer
No
Assigns a value to a workflow variable.
Command
Task Developer
Workflow Designer 
Worklet Designer
Yes
Specifies shell commands to run during the workflow. You can choose to run the Command task if the previous task in the workflow completes.
Control
Workflow Designer 
Worklet Designer
No
Stops or aborts the workflow.
Decision
Workflow Designer 
Worklet Designer
No
Specifies a condition to evaluate in the workflow. Use the Decision task to create branches in a workflow.
Email
Task Developer
Workflow Designer 
Worklet Designer
Yes
Sends email during the workflow.
Event-Raise
Workflow Designer 
Worklet Designer
No
Represents the location of a user-defined event. The Event-Raise task triggers the user-defined event when the Integration Service runs the Event-Raise task.
Event-Wait
Workflow Designer 
Worklet Designer
No
Waits for a user-defined or a predefined event to occur. Once the event occurs, the Integration Service completes the rest of the workflow.
Session
Task Developer
Workflow Designer 
Worklet Designer
Yes
Set of instructions to run a mapping.
Timer
Workflow Designer 
Worklet Designer
No
Waits for a specified period of time to run the next task.

The Workflow Manager validates tasks attributes and links. If a task is invalid, the workflow becomes invalid. Workflows containing invalid sessions may still be valid.

Tuesday, 30 September 2014

Informatica Tips

Informatica Performance Improvement Tips

Following standards/guidelines can improve the overall performance:
  • Use Source Qualifier if the Source tables reside in the same schema.
  • Make use of Source Qualifer  "Filter" Properties if the Source type is Relational.
  • If the subsequent sessions are doing lookup on the same table, use persistent cache in the first session. Data remains in the Cache and available for the subsequent session for usage.
  • Use flags as integer, as the integer comparison is faster than the string comparison.
  • Use tables with lesser number of records as master table for joins.
  • While reading from Flat files, define the appropriate data type instead of reading as String and converting.
  • Have all Ports that are required connected to Subsequent Transformations else check whether we can remove these ports.
  • Suppress ORDER BY using the '--' at the end of the query in Lookup Transformations.
  • Minimize the number of Update strategies.
  • Group by simple columns in transformations like Aggregate, Source Qualifier.
  • Use Router transformation in place of multiple Filter transformations.
  • Turn off the Verbose Logging while moving the workflows to Production environment.
  • For large volume of data drop index before loading and recreate indexes after load.
  • For large of volume of records Use Bulk load Increase the commit interval to a higher value large volume of data.
  • Set 'Commit on Target' in the sessions.

Thursday, 21 August 2014

UNIX COMMANDS 1

FILE COMMANDS

touch - Create a new file.

  • Usage: touch <filename>


cp - Copy files.


  • Usage: cp [options] <source-filename> <destination-filename>
  • cp [options] <source-filepath > <destination filepath>
  • Options: -r recursively copy directory structures.

mv - Move or Rename files or directories.

  • Usage: mv [options] <old-filepath> <new-filepath>
  • mv [options] <old-filename> <new-filename>
  • Options: -i query user for confirmation.

rm - Remove files.


  • Usage: rm [options] <filname>
  • Options: -r recursively remove directory structures. 
  • -i query user for confirmation. 

cat - View complete file content.



  • cat <filename>

more - View file contents in sections determined by the size of the terminal.



  • Usage: more <filename>


less - View file contents in sections determined by the size of the terminal.


  • Has more options and search features than more.
  • Usage: less [options] <filename>


compress - Reduces the size of the file. and adds the extension .Z



  • Usage: compress <filename>.


uncompress


  • Restores a compressed file.
  • Usage: uncompress <filename>
  • Usage: zcat <filename>

Wednesday, 9 July 2014

Project Explanation


Project Explanation:

First u have to start with

1) You have to first explain about objective of the project and what is client expectations
2) You have to start where your involvement and responsibility of your job and limitations of job.

Add some points from post Project Architecture reply like offshore and onsite model and team structure. etc.,

Main objective of this project is we are providing a system with all the information regarding Sales / Transactions (sales if sales domain / transactions if bank domain or insurance domain) of entire organizations all over the country US / UK ( based on the client location US/UK/….). we will get the daily transaction data from all branches at the end of the day. We have to validate the transactions and implement the business logic based on the transactions type or transaction code. We have to load all historical data into data warehouse and once finished historical data. We have to load Delta Loads. Delta load means last 24 hrs transactions captured from the source system. In other words u can call it as Change Data Capture (CDC). This Delta loads are scheduled daily basis. Pick some points from What is Target Staging Area Post. Source to Staging mappings, staging to warehousing. based on your comfort level.

Each transaction contains Transaction code. based on the transaction code u can identify whether that transaction belongs to sales, purchase / car insurance, health insurance, /deposit , loan, payment ( u have to change the words based on the project.) etc., based on that code business logic will be change. we validate and calculate the measure and load to database.

Mapping explanation :

In Informatica mapping, we first look up all the transaction codes with code master table to identify the transaction type to implement the correct logic and filter the unnecessary transactions. because in an organization there are lot of transactions will be there but you have to consider only required transactions for your project. the transaction code exists in the code master table are only transactions u have to consider and other transactions load into one table called Wrap table and invalid records( transaction code missing, null,spaces) to error table. For each dimension table we are creating surrogate key and load into data-warehouse tables.

SCD2 Mapping:We are implementing SCD2 mapping for customer dimension or account dimension to keep history of the accounts or customers. We are using SCD2 Date method. before telling this you should know it clearly about this SCD2 method.

Wednesday, 25 June 2014

My 100 th post

Boom, it's my 100 th post. I just wanna share my happiness at this time. I started this blog two year ago with no idea where to start and where to end. Later I came to know this will be my never ending one till my life end.

I began to love this blog. It has a peaceful place place for me to learn.

Sharing these things with you has done so much for me. I hope whoever reads this blog, learn it, feels encouraged because of what I write here.

'I hope it brings some good to the world'.


Kiro - Core Features

What is Kiro Kiro is an innovative AI-powered IDE that revolutionizes software development through intelligent assistance and structured wor...