how to create a mapping with loop in informatica powercenter. It should read a count with where clause from a table and for that I will use a expression then delete if matches if the count is >0 and also commit in intervals.
You dont need a loop. You can use Joiner/filter/aggregator and target definition with correct Key defined.
group 1 = rcount >0
group 2 = rcount <=0
delete
for target. Also ensure taregt commit interval is 1000.Pls note if you dont want to use key column as delete and want to use some other column, you can use target overwrite SQL as well.
Whole mapping will look like this
|-FIL--> Agg_Cnt-->|
SQ --> ----------------->JNR_mainflow -->RTR_cnt_gt_0 -->Target