Sunday, February 16, 2014

Top tar command example in unix

In Unix, the name of the tar command is short for tape archiving, the storing of entire file systems onto magnetic tape, which is one use for the command. However, a more common use for tar is to simply combine a few files into a single file, for easy storage and distribution. Must Read : Learn more about VI editor here unix tar command To combine multiple files and/or directories into a single file, use the following command: tar -cvf file.tar inputfile1 inputfile2 Replace inputfile1 and inputfile2 with the files and/or directories you want to combine. You can use any name in place of file.tar, though you should keep the.tar extension. If you don't use the  f  option, tar assumes you really do want to create a tape archive instead of joining up a number of files. The  v  option tells tar to be verbose, which reports all files as they are added. To separate an archive created by tar into separate files, at the shell prompt, enter: tar -xvf file.tar Must Read : Learn more about find command here A good article of Tar/untar command can be found  here. [contact-form][contact-field label='Name' type='name' required='1'/][contact-field label='Email' type='email' required='1'/][contact-field label='Website' type='url'/][contact-field label='Comment' type='textarea' required='1'/][/contact-form]

Friday, February 14, 2014

Joiner Transformation in Informatica

Joiner Transformation in Informatica , is a connected and active transformation which let you join data from two heterogeneous source (same source system or different source system). Unlike normal SQL joins , we can join data from file system as well. [caption id="" align="alignnone" width="584"] Joiner Transformation in Informatica[/caption]

Must check : Please also check how to create Aggregator Transformation

Join Type

Normal Join A normal join will allow only those records which satisfy the joiner condition for both sources. So remaining records, who don’t match the condition get discarded Master Outer Join A master outer join will keeps all rows of data from the detail source and the matching rows from the master source. If any of master records don’t satisfy the condition , those rows get discarded. Detail Outer Join Just opposite to Master Outer join , it keep all rows of data from Master Source and the matching rows from Details Source. If  any of detail records don’t satisfy the condition , those rows get discarded. Full Outer Join A full outer join keeps all rows of data from both the master and detail sources. Joiner Transformation step 7   Must Read : Learn more about informatica coding standard Example of Joiner Transformation in Informatica: A good example of Joiner transformation with different type of join can be found here. For explanation on joiner transformation , you can read it here Hope you enjoyed this tutorial on joiner transformation in informatica.

Tuesday, February 11, 2014

Java Transformation in Informatica with Example

Java Transformation in Informatica , is a connected and active /Passive transformation which provides a simple native programming interface to define transformation functionality with the Java programming language. You can use Java transformation in Informatica to quickly define simple or moderately complex transformation functionality without advanced knowledge of the Java programming language or an external Java development environment Must read : check more about Informatica Naming convention

Few of the sample scenarios are as follows:

  • A Java transformation contains two input ports that represent a start date and an end date. You can generate an output row for each date between the start date and end date.
  •  you can define transformation logic to loop through input rows and generate multiple output rows based on a specific condition.
Must check : Please also check how to create Aggregator Transformation Java Transformation: A very good example of Active Java transformation can be found here Extra read: Problem :  Create a Informatica mapping to convert subject wise marks (populated in different rows) for student  into  a single row for each student with marks in a separate column for each subject.

Source Data:

STUDENT_MARKS Table Data

STUDENT_NO SUBJECT MARKS
1 Math 87
1 Eng 66
1 Science 78
2 Math 45
2 Eng 64
2 Science 55
3 Math 46
3 Eng 89
4 Science 86

Target Data:

STUDENT_MARK_NEW :

STUDENT MATH_MARK SCIENCE_MARK ENG_MARK
1 87 78 66
2 45 55 64
3 46 NULL 89
4 NULL 86 NULL
See solution here

Monday, February 3, 2014

Lookup Transformation in Informatica

Lookup Transformation in Informatica , is a connected/Unconnected and Passive transformation which let you look up data flat file/relation tables ,views or synonym. The Integration Service queries the lookup source based on the lookup ports in the transformation and a lookup condition. The Lookup transformation returns the result of the lookup to the target or another transformation . Example : you may lookup transformation on DEPT tables to get DEPT details based on DEPTNO as input port. Must check : Please also check how to create Aggregator Transformation Connected Lookup Transformation: A very well explained  example of Connected lookup transformation can be found here Unconnected Lookup Transformation: A very well explained  example of UnConnected lookup transformation can be found here Normally source of Lookup is either files or relational database, See here for explaination To improve the performance of lookup transformation , we will need to enable the cache , see here for  different type of cache lookup transformation. There are other guideline also given to improve the performance. A good article can be found here Also check here to see the  difference between Static cache and Dynamic Cache : http://www.tecktricks.com/difference-between-static-cache-and-dynamic-cache-in-informatica/