Professional Documents
Culture Documents
i want to write nelluri in one target,satya in another target and bsc in another
target
i know this we can achive by using substr in exp and router with length argument
but if the file contains multiple rcords how will u apporoach thisin another wa
y? Jan 13 (21 hours ago) delete
RamaSurReddy
Hi Veeru,
Write One Stored Procedure and call this Procedure as unconnected inside ur mapp
ing and made this as normal and call this SP 3 times by passing String and Table
Name separetly each time Or Use SQL Transformation
Procedure Logic : (Use Dynamic querys to make the insert statement dynamically(T
able Name and use execute immediate statement.
Regards,
RSReddy
********************************************************************************
*****************************
2) veeru
very urgent
1.suppose if my source contains 100000 of records,i want to load 1-10000 recods
in one day,10000-20000 records in second day in the sanme manner 90000-100000 re
cods in th 10 th day how can we achive this using informatica
let us take the normal dept table as an example
2 how can we get particular day data without having any timestamp from a source
table Jan 13 (22 hours ago) delete RamaSurReddy
Hi Veeru,
1)
Through Informatica Its Not Possible.Using Unix Script and Informatica PMCMD Com
mand we will do the Same.Please loigc for the unix Script at high Level :
1)Get the no of records from the File Say (n)
2) Devide that number by 10000 say (s=n/10000)
3)start=1,end=10000
4)For i=1 to s
{
sed start end filename > newoutputfilename
Todaydate=extract day from the date
start= i*10000
end=start+10000
while todaydate=extract day from the date
{
sleep()
}
pmcmd startworkflow workflowname(Infformatica Workfow with file direct)
}
2) Use trunc example select count(*),trunc(insert_dt) from tables group by trunc
(insert_dt)
Regards,
RSReddy
********************************************************************************
************************
3)WIPRO interview questions
1. my source data is like this column1
a
a
b
b
b
In the target i want this column1 column2
a 1
a 2
b 1
b 2
b 3
2.we want to load the number of rows inserted and number rows update data to a t
able.How can we achieve in informatica
RamaSurReddy
Hi All,
Use Oracle Analytical Functions(Rownum and Over by Partition Clause) in source q
ualifer query,if ur source is Oracle
If its a Flat-File use Aggregator and Sorter Transformation Combination
********************************************************************************
********************************
5)..::RAHUL::..
Field value insertion using Parameter file
I am facing a problem with parametrization
I have about 5-10 mappings and in which all target tables have a common field PR
OID ,
I need to insert a data ID123 to PROID in all the tables using parameter that is
with out hard coding , can any one please tell me how it can be achieved my a s
ingle parameter file for all 10 mappings
Thanks Rahul 12/23/09 delete
RamaSurReddy
Hi All,
Create One Common Parameter File for all ur 10 Mappings.Use the Same Parameter i
n all your Mappings Means For each Mapping Create One Output Variable and Assign
the Parameter Value to the O/P Port.
Regards,
Suri
********************************************************************************
*******************************
7)sandeep
Sceneario to implement
I have source records coming as flat file
EMPNO|PR|AMOUNT
123456|P|20
123456|R|6000
This needs to be split into single row to reach the target defination as we repo
rt only one row per EMPNO
Target should produce 1 record per Employee as a flatfile
123456|P|20|R|6000
********************************************************************************
******************************
8)
mallika
scenario
Source table has 100 records, half of the 100 records(1 to 50) should go to targ
et-1 and remaining half of the record (51 to 100)should go to targte-2 ? how to
achieve this?
I tried by hardcoding. without hardcoding how to get the result.
RamaSurReddy
Hi All,
Here For You : Source is RDBMS So, Follow the Below Steps , It will increase the
Performance :
1) in Source Qualifier : select rownum,Columns from the tables
2)Sources Post SQL : select count(*)/2 into $Valriable from table ($ varaible is
nothing but Informatica Variable)
3)Take the Router and create a Port and antoher one is defefallt
First Port Cond---> Rownum <= $variable
Default Port Cond--->Default
4)Pass the Ports to Indivisual Targets
Let me know if u need more info ?
********************************************************************************
*************************
8)Surya Keran
Need answer
Hi every one..
Needed help for the below scenario.
Let us assume that the mapping is running daily @ 8 pm to capture latest data fr
om the sources and it will completes by 9 pm. After 9 pm some changes takes plac
e at the source database.
I used mapping variable and it will assigned to current date and condition in th
e transformation is grater than current date. So for next session run it capture
s data from 12 AM of next day. In this scenario data missing which was updated a
fter 9 PM.
So how can i get that missing data including latest data from source?
Thanks in advance....
RamaSurReddy
Hi All,
Usually For Extracting Data From Source System incrementaly using dates will wil
l use 2 variables/Parameters say From_date and To_date : Use the Below Logic.U n
evel miss Any Data :
When Worlflow Stars : Update/Assign the to_date with WorkflowStartTime/SESSSTART
TIME.
End Of the Workflow : Swap the Dates Means (From_date=To_date)
Example :
1 Run : From _date : 28-12-2009 08:08:12 PM
To_date : SESSSTARTIME (29-12-2009 09:09:00 PM)
End Of the Run Swap the Dates : Now
From_date : 29-12-2009 09:09:00 PM
To_date : 29-12-2009 09:09:00 PM
2 Run : From_date : 29-12-2009 09:09:00 PM
To_date : SESSSTARTIME (30-12-2009 09:09:00 PM)
End Of the Run Swap the Dates : Now
From_date : 30-12-2009 09:09:00 PM
To_date : 30-12-2009 09:09:00 PM
Let me Know If u need more info
********************************************************************************
*********************
10)ashok~
Query
Hi,
I have a oracle source and flat file as a target. As soon as i update my target.
I want to update my source(some field) for those records which are sent to the
target.
Please suggest how this can be done.
Post SQL?or creating another flow?
Hope my question is clear. 12/8/09 delete RamaSurReddy
Hi Ashok,
Here For you , Source---> Oralce and Target ---> Flat-File
The Post/Pre SQl is not possible if u have Flat-File as Target. so u need to Cre
ate a Separte flow.
First Flow---> Source (Oralce)--->Target(Flat_file)
Seconds Flow-->Source(Flat-File)---SQ-->Filter Trans (Trunc(Last Update Filed)=T
runc(SESSSTARTTIME)--->UPD Trans (DD_UPDATE)--->Target(Oracle)
enable the Target Load Plan .
Regards,
Suri
********************************************************************************
******************************************************************************
10)
Divz.......
Plz help me..
Am working in informatica 8.6, flat file as source, need to load the data into s
taging area first in that i need to satify
1) Check to see if the input file has changed from the previous day. Only load i
f the input file has changed from the previous day.
sol i got is .Compare of file s need to be done using file level checksum and not
by file size. any one have any idea...
RamaSurReddy
Hi All,
Create One Command Task that will call the Unix Shell script to do the Data Vali
dations and to inwoke the Workflow. Logic for the unix script is :
1) using mtime command in unix , get the last modification date of the file and
then check that date with today's data :
1.1) If there is a change then calucuate the Checksum, if the check sum is not c
orrect
exit from the unix script
1.2) Else (Dates are Different means the file is the latest one and Check sum al
so matching then using PMCMD command inwoke the workflow
********************************************************************************
**********************************************************************
11)
Prasant
need help
Hi ,
I have two source files
file 1
A B C
1 abc def
1 ijk lmn
1 123 opq
File 2
A E F
1 x y
1 a b
1 t p
Let us assume that the above is table with single column called NAME
and the below are the records of the table.
The question here is
Want to display how many times that the 'A' reoccurs in each record should be di
splayed in separate column of different table.
Ans:
Hi Surya,
Select Name,REGEXP_COUNT(name, 'a', 1, 'i') as "Count" from Source_table
Fire the Above query in ur Source Qualifier Transformation then drag the two col
umns into your O/P Table Name
Mapping Flow--->Source(One Column)--->Source Qualifer--->Target(2 columns Name,C
ount)
REGEXP_COUNT is a new function added from Oracle 10g Onwards.This function will
give the no of times that a single character is repeated in a given string.
Example : I/P--->'RaMASURIREDDY'.I want to find out How many time 'A' Repeated.
select REGEXP_COUNT('RAMASURIREDDY','A',1,'i') from dual will give you=2
Here 'i' means Ignore case.
Let me know if you need more info ?
Regards,
RAMASURREDDY
********************************************************************************
***************************************************
25)
Hi all
I have a query which i am illustarting through the below example
SHOP_NAME , COUNTER_NO SHOP_ADDRESS
SHOP_1, 1, ABC
SHOP_1, 2, ABC
SHOP_1, 3, ABC
SHOP_2, 1, DEF
SHOP_2, 2, DEF
SHOP_3, 1, GHI
I need the COUNTER_NO in sequencial order w.r.t he SHOP_NAME
which transformation should i use and in which way
i tried with sequence generator.. but it gives a seqential no irrespective of an
y field(SHOP_NAME)
Ans :
Hi Kanhu,
Use Row_number Analytical Functions in Oracle. (Diff Between RANK/DENSE RANK,ROW
NUM,ROW_NUMBER()
Regards,
RAMASUREDDY
********************************************************************************
***********************************
26)
RAJESH
Need help to solve
In my source the table data like this in two column:
parent child
p1 p2
p2 p3
p3 p4
I need the result like this in target table:
level1 level2 level3 level4
p1 p1 p1 p1
p1 p2 p2 p2
p1 p2 p3 p3
p1 p2 p3 p4
ANS :
Hi Rajesh,
Interesting Question ......