1
2
3
*
4
5
6
*
7
8
9
how to load records between two stars(*),
Answers were Sorted based on User's Feedback
Answer / sunny
select substr(
(select substr('123*456*789', 1 ,
instr('123*456*789','*',1,2)-1) from dual)
,instr(
(select substr('123*456*789', 1 ,
instr('123*456*789','*',1,2)-1) from dual)
,'*',1)+1) from dual;
| Is This Answer Correct ? | 6 Yes | 1 No |
Answer / ankur
small change in the above post..
add an exp after source qualifier...with two more ports
v_out as variable =iif((is_number(inputport),v_out,v_out+1)
output=v_out
so output from this exp will be
1 0
2 0
3 0
* 1
4 1
5 1
6 1
* 2
7 2
8 2
8 2
now add a filter where output=1 and in_number(input)
Thanks
| Is This Answer Correct ? | 4 Yes | 3 No |
Answer / krishna
Mapping
source - SQ -> Exp T/r -> Filter -> target
Exp t/r:
create 4 variable and 3 output ports.
v_curr,v_flag,o_filter,o_flag,v_count,v_prev,0_count
v_flag = iif(v_currnt = '*' OR v_prev = '*' or flag_v=1,
1,0)
v_count = iif(v_prev='*',count+1,count)
o_filter = iif(No!= '*',1,0)
o_flag = v_flag
0_count = v_count
filter t/r:
condition: o_flag=1 AND o_filter=1 AND 0_count!=2
| Is This Answer Correct ? | 1 Yes | 1 No |
Answer / lakshmi
Use Replacechr() in Expression T/r after Source Qualifier
and replace '*' with Space
Then In Filter T/r Use Filter condition as below
iif(isspaces(field,0,1))
| Is This Answer Correct ? | 2 Yes | 2 No |
Answer / siva riddle
first of all , understand the requirement
it's.
records in between * 456 * ,
how to get this 3 records.
| Is This Answer Correct ? | 0 Yes | 0 No |
Answer / guest
u can use mapping variable in exp transformation.
and do
decode(v_curr='*' or v_prev='*',setvariable($$,$$+1),$$)
and last port in exp setvariable($$,0) and accrdingly filter the non required...
| Is This Answer Correct ? | 1 Yes | 2 No |
Answer / ankur
small change in the above post..
add an exp after source qualifier...with two more ports
v_out as variable =iif((is_number(inputport),v_out,v_out+1)
output=v_out
so output from this exp will be
1 0
2 0
3 0
* 1
4 1
5 1
6 1
* 2
7 2
8 2
8 2
now add a filter where output=1
Thanks
| Is This Answer Correct ? | 2 Yes | 3 No |
Answer / ankur saini
hey guys c if this works...
add an exp after source qualifier...with two more ports
v_out as variable =iif((is_number(inputport),0,v_out+1)
output=v_out
so output from this exp will be
1 0
2 0
3 0
* 1
....
* 2
...
now add a filter where output>0
Thanks
| Is This Answer Correct ? | 0 Yes | 4 No |
Answer / anas furquan
Use Filter transformation with below condition:
IIF(FIELD!='*',1,0)
Mapping:
Source-->SQ-->Filter-->Target
This works. :)
| Is This Answer Correct ? | 1 Yes | 8 No |
If i have one source having 10 ports.In a mapping i use that source one target having that ten ports.Data from 5 ports are going to target through a mapplet and another 5 ports are going to target through another mapplet.Both 2 mapplets are intially passive in nature.But presently my requirment to convert on mapplet to ACtive.How can i do it.
What is staging area?
what are the real time problems generally come up while doing or running mapping or any transformation?
How could we generate the sequence of key values without using sequence generator transformation in the target ??
12 Answers TCS, Tech Mahindra,
for ex: in source 10 records are there with column sal. use a filter transformation condition as Sal=TRUE and connect to target. what will happen.
Hi All, I have three question. 1) How to remove the header and footer in a flat file in informatica? 2)How to load the first and last record of flat file into the target? 3)I have a Input and Output table. Input Name Salaray Month A 100 Jan A 200 Feb A 300 March B 400 April B 500 May B 600 June Output Name Salaray Month A 100 Jan A 300 Feb A 600 March B 400 April B 900 May B 1500 June How to implement and get the ouput as mentioned above. If Possible kindly provide the SQL query also. Kindly any one help to implement this concept. Thanks, Pradeep
Design a mapping to get the pervious row salary for the current row. If there is no pervious row exists for the current row, then the pervious row salary should be displayed as null.
what r the propertes of workflow? and write quary to select dept more ten employess in dept.?
Source (Flatfile) - Target (1-1 mapping). How to load first or last 20 record to target?
How can u insert o ne row in the target if that row does not exists in the target and update if it exists
Tell me about informatica architecture.
How your source files are coming to your ETL server. Actually at which stage of your mapping it is happen.