You are on page 1of 2

Informatica Asssignment

Execute all these one after the other.

1. Attached are two data files, CL_Transaction.dat, Xt_Transaction.dat.The column

names for CL_Transaction.dat file are Policy_Effective_Date, UserId,
Policy_Expiry_date, RecordId, Tran_amount and the column names for
Xt_Transaction.dat file are RecordId, Tran_code, TranId.
2. Taking the CL_Transaction.dat as the source file, lookup the Xt_Transaction.dat
file with RecordId as the lookup column. The final target file that is obtained after
the lookup must contain the following columns. Policy_Effective_Date,
Policy_Expiry_date, RecordId, Tran_amount, Tran_code.
3. After doing step 3, to that target file, do the following.
4. Add 5 columns named year, month, date, hrs, minutes, seconds and divide the
first_insert_date column into these 5 fields.
Ex: 19990715093252 => year = 1997, month = 07, date = 15, hrs = 09,
Minutes=32, seconds = 52.
5. Add a new column month_desc for which the output should be the name of month
Ex: month=01 => month_desc = January, month = 02 => month_desc =
6. Create a new column time whose structure should be hrs:minutes:seconds
Ex: hrs=09, minutes = 32, seconds = 52 => time = 09:32:52
7. Create new columns day, dtfmt1, dtfmt2 which conform with the following rules
Ex: year = 1997, month = 07, date = 15 day => Monday or Tuesday or
Wednesday ….. (i.e. the corresponding day of the date), dtfmt1 => 15jul 1997
and dtfmt2 = 07/ 15/1997
8. Add three new columns jobname, startdate, starttimestamp whose values will be
Jobname => name of the job that is running, startdate => day when the job started
running, starttimestamp => time when the job started running.
9. Add a new field fmt_amt to Format all the tran_amount values into $.
Ex: If the tran_amount = 1200.00 then fmt_amt = $1,200.00
Hint : Use fmt function
10. Get only those records whose year = 1997.
11. In the subroutine that have been created for previously with if code =’I1’ ….. use
a CASE statement and execute the same routine and the result must be the same s
obtained with IF.

182CATF125|A C|SAM

For this code_textfile, do the following

1. Validate the code using the following rules. If the code is invalid, the whole record
must be loaded into a reject file.
• The length of the field must be 10.
• If the code has ‘*’ replace the field with ‘Q’
• The first 3 characters of the code must be a number and the next 4 fields must
be characters (a-z, A-Z).
• If a field has a * and has been relaced with ‘Q’ in the above first 7 fields, the
code is invalid and if not then the code is valid and should conforms with the
above specification also.
2. Add a new field concats1s2 which concatenates the strings s1 and s2
Ex: string1 =abc and string2 = cde concats1s1 =>abccde
String1 =cde and string2= concats1s2 =>cde
3. Add a new field conconcats1s2. To populate this field, compare both strings s1 and s2
and if s1>s2 then concats1s2 = > s1s2 and if s1<s2 concats1s2 = > s2s1.
4. Add a field countvowels and populate the field with the count of all the vowels
(a,e,i,o,u or A,E,I,O,U) present in the field concats1s2.
5. Add a new field repvow. To populate this field, replace all the occurances of vowels
(a,e,i,o,u or A,E,I,O,U) with zyxwv respectively i.e replace a =z,e=y,i=x,o=w,u=v
Ex: amnipute => zmnxpvty.
6. Add a field countcode. Populate the field with the number of occurrences of ‘A’ in
the code column.
7. Add a new field, get_count_code. Populate this field with, get the concatenated value
of the first and second fields of code column delimited by ‘A’.
Ex: code = 12ACDFGA12 get_count_code => 12:CDFG
8. Convert the concatss1s2 field into upper case and lowercases and dump them into two
new columns.