You are on page 1of 2

Informatica Metadata Repository tables

While browsing through the Informatica rep and opb tables, we are usually stuck up as we do not understand what the widget_id and widget_types are for. OPB tables are the basic repository tables which are created when we create a repository. These tables are continuously updated whenever we make a change in our repository like creating new objects, modifying existing objects, deleting objects. REP are the views not the tables. are the views which are created on our OPB tables for querying purposes. Since any unauthorized modification in our OPB tables and REP views can make our repository non-workable, their access is very limited. WIDGET ID is a unique id which is present in our OPB tables. Each transformation we create in our repository has a WIDGET ID associated with it. Below is the list of widget_types. This data would help us ease the handling of metadata.
Widget Ids and transformation types widget_type Type of transformation 1 2 3 4 5 6 7 8 9 10 11 12 14 15 26 44 46 47 55 80 97 Source Target Source Qualifier Update Strategy expression Stored Procedures Sequence Generator External Procedures Aggregator Filter Lookup Joiner Normalizer Router Rank mapplet mapplet input mapplet output XML source Qualifier Sorter Custom Transformation

What are widget IDs and why do we require them?

Informatica maintains metadata regarding the mappings and its transformations, sessions, workflows and their statistics. These details are maintained in a set of tables called OPB tables and REP tables. The widget refers to the types of transformation details stored in these tables.

Port types in a transformation


As the above section details, widget is a transformation in metadata tables. To get the port type from repository table, below is the SQL snippet to use select a.widget_id, decode(a.porttype, 1, 'INPUT', 3, 'IN-OUT', 2, 'OUT', 32, 'VARIABLE', 8, 'LOOKUP', 10, 'OUT-LOOKUP', to_char(a.porttype)) Port_Type from opb_widget_field a; If you want to know the mapping name, then match the widget_id against the widget_id of opb_widget_inst and then pull the mapping_id which can be mapped against mapping_id in opb_mappings table. If you want to know the Folder name, then map the subject_id from opb_mappings to that of subj_id in OPB_SUBJECTS table to get the subject_name.

Expressions and SQL overrides in a transformation


OPB_EXPRESSION is the table that stores all the expressions in metadata. To associate an expression to a field in a transformation, OPB_WIDG_EXPR is the table to be used. select g.expression from opb_widget_expr f, opb_expression g where f.expr_id = g.expr_id SQL overrides can be in Source Qualifiers and Lookup transformations. To get the SQL Override from metadata, check REP_WIDGET_ATTR.ATTR_VALUE column.

Sample SQL:
#1 SELECT SUBJECT_AREA,SOURCE_NAME,TARGET_NAME,MAPPING_NAME FROM REP_TBL_MAPPING #2 Using: OPB_Subject, OPB_Mapping, OPB_source. OPB_Suject table contains the Folder Information SELECT OPB_SUBJECT.SUBJ_NAME, OPB_MAPPING.MAPPING_NAME,OPB_SRC.source_name FROM opb_mapping, opb_subject, opb_src, opb_widget_inst WHERE opb_subject.SUBJ_ID = opb_mapping.SUBJECT_ID AND OPB_MAPPING.MAPPING_ID = OPB_WIDGET_INST.MAPPING_ID AND OPB_WIDGET_Inst.WIDGET_ID = OPB_SRC.SRC_ID AND OPB_widget_inst.widget_type=1

You might also like