11 May 2012

Repository Query to pull details from expression transformation


My friend had a requirement to list all the port names where a particular input port is used in the expression (variable/output) within the Expression Transformation.

Example:
Port1   --- Input Port
Port2   IIF (Port1=’0’,1,0)

So the repository query to retrieve details about Port2 is as below.

select c.subject_area,c.mapping_name,b.instance_name,a.field_name,a.expression
from REP_WIDGET_FIELD a,REP_widget_inst b,REP_all_mappings c
where
a.widget_id=b.widget_id
and b.widget_type=5 ( 5 is for “Expression Transformation” )
and b.mapping_id=c.mapping_id
and c.mapping_name= <Mapping Name>
and a.expression like '%<Input Port Name>%'

1 comment: