+ All Categories
Home > Documents > a Repository Tables

a Repository Tables

Date post: 03-Dec-2014
Category:
Upload: ranabratar
View: 480 times
Download: 30 times
Share this document with a friend
Popular Tags:
22
The information is there in two special views in the repository: REP_TARG_MAPPING REP_SRC_MAPPING Now every mapping can have both multiple sources / multiple targets, so a join over the fields SUBJECT_AREA / MAPPING_NAME will produce correct result for mappings that have 1 source and one target. In other cases you can modify the SQL: Select DISTINCT SOURCE_NAME,TARGET_NAME,A.MAPPING_NAME from REPO51.REP_SRC_MAPPING A,REPO51.REP_TARG_MAPPING B WHERE A.MAPPING_NAME = B.MAPPING_NAME Informatica PowerCenter Repository tables I am sure every PowerCenter developer either has an intention or necessity to know about the Informatica metadata tables and where information is stored etc. For the starters, all the objects that we create in Informatica PowerCenter - let them be sources, targets, mappings, workflows, sessions, expressions, be it anything related to PowerCenter, will get stored in a set of database tables (call them as metadata tables or OPB tables or repository tables). * I want to know all the sessions in my folder that are calling some shell script/command in the Post- Session command task. * I want to know how many mappings have transformations that contain "STOCK_CODE" defined as a port. * I want to know all unused ports in my repository
Transcript

The information is there in two special views in the repository: REP_TARG_MAPPING REP_SRC_MAPPING Now every mapping can have both multiple sources / multiple targets, so a join over the fields SUBJECT_AREA / MAPPING_NAME will produce correct result for mappings that have 1 source and one target. In other cases you can modify the SQL: Select DISTINCT SOURCE_NAME,TARGET_NAME,A.MAPPING_NAME from REPO51.REP_SRC_MAPPING A,REPO51.REP_TARG_MAPPING B WHERE A.MAPPING_NAME = B.MAPPING_NAME

Informatica PowerCenter Repository tables

I am sure every PowerCenter developer either has an intention or necessity to know about the Informatica metadata tables and where information is stored etc. For the starters, all the objects that we create in Informatica PowerCenter - let them be sources, targets, mappings, workflows, sessions, expressions, be it anything related to PowerCenter, will get stored in a set of database tables (call them as metadata tables or OPB tables or repository tables). * I want to know all the sessions in my folder that are calling some shell script/command in the Post-Session command task. * I want to know how many mappings have transformations that contain "STOCK_CODE" defined as a port. * I want to know all unused ports in my repository of 100 folders. In repositories where you have many number of sessions or workflows or mappings, it gets difficult to achieve this with the help of Informatica PowerCenter client tools. After all, whole of this data is stored in some form in the metadata tables. So if you know the data model of these repository tables, you will be in a better position to answer these questions. Before we proceed further, let me clearly urge for something very important. Data in the repository/metadata/OPB tables is very sensitive and that the modifications like insert or updates are to be

made using the PowerCenter tools ONLY. DO NOT DIRECTLY USE UPDATE OR INSERT COMMANDS AGAINST THESE TABLES. Please also note that there is no official documentation from Informatica Corporation on how these tables act. It is purely based on my assumption, research and experience that I am providing these details. I will not be responsible to any of the damages caused if you use any statement other than the SELECT, knowing the details from this blog article. This is my disclaimer. Let us move on to the contents now. There around a couple of hundred OPB tables in 7.x version of PowerCenter, but in 8.x, this number crosses 400. In this regard, I am going to talk about few important tables in this articles. As such, this is not a small topic to cover in one article. I shall write few more to cover other important tables like OPB_TDS, OPB_SESSLOG etc. We shall start with OPB_SUBJECT now. OPB_SUBJECT - PowerCenter folders table This table stores the name of each PowerCenter repository folder. Usage: Join any of the repository tables that have SUBJECT_ID as column with that of SUBJ_ID in this table to know the folder name. OPB_MAPPING - Mappings table This table stores the name and ID of each mapping and its corresponding folder. Usage: Join any of the repository tables that have MAPPING_ID as column with that of MAPPING_ID in this table to know the mapping name. OPB_TASK - Tasks table like sessions, workflow etc This table stores the name and ID of each task like session, workflow and its corresponding folder.

Usage: Join any of the repository tables that have TASK_ID as column with that of TASK_ID/SESSION_ID in this table to know the task name. Observe that the session and also workflow are stored as tasks in the repository. TASK_TYPE for session is 68 and that of the workflow is 71. OPB_SESSION - Session & Mapping linkage table This table stores the linkage between the session and the corresponding mapping. As informed in the earlier paragraph, you can use the SESSION_ID in this table to join with TASK_ID of OPB_TASK table. OPB_TASK_ATTR - Task attributes tables This is the table that stores the attribute values (like Session log name etc) for tasks. Usage: Use the ATTR_ID of this table to that of the ATTR_ID of OPB_ATTR table to find what each attribute in this table means. You can know more about OPB_ATTR table in the next paragraphs. OPB_WIDGET - Transformations table This table stores the names and IDs of all the transformations with their folder details. Usage: Use WIDGET_ID from this table to that of the WIDGET_ID of any of the tables to know the transformation name and the folder details. Use this table in conjunction with OPB_WIDGET_ATTR or OPB_WIDGET_EXPR to know more about each transformation etc. OPB_WIDGET_FIELD - Transformation ports table This table stores the names and IDs of all the transformation fields for each of the transformations. Usage: Take the FIELD_ID from this table and match it against the FIELD_ID of any of the tables like OPB_WIDGET_DEP and you can get the corresponding information.

OPB_WIDGET_ATTR - Transformation properties table This table stores all the properties details about each of the transformations. Usage: Use the ATTR_ID of this table to that of the ATTR_ID of OPB_ATTR table to find what each attribute in this transformation means. OPB_EXPRESSION - Expressions table This table stores the details of the expressions used anywhere in PowerCenter. Usage: Use this table in conjunction with OPB_WIDGET/OPB_WIDGET_INST and OPB_WIDGET_EXPR to get the expressions in the Expression transformation for a particular, mapping or a set. OPB_ATTR - Attributes This table has a list of attributes and their default values if any. You can get the ATTR_ID from this table and look it up against any of the tables where you can get the attribute value. You should also make a note of the ATTR_TYPE, OBJECT_TYPE_ID before you pick up the ATTR_ID. You can find the same ATTR_ID in the table, but with different ATTR_TYPE or OBJECT_TYPE_ID. OPB_COMPONENT - Session Component This table stores the component details like Post-Session-SuccessEmail, commands in Post-Session/pre-Session etc. Usage: Match the TASK_ID with that of the SESSION_ID in OPB_SESSION table to get the SESSION_NAME and to get the shell command or batch command that is there for the session, join this table with OPB_TASK_VAL_LIST table on TASK_ID. OPB_CFG_ATTR - Session Configuration Attributes

This table stores the attribute values for Session Object configuration like "Save Session log by", Session log path etc.

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. Below is the list of widget_types. This data would help us ease the handling of metadata. Widget Ids and transformation types widget_type 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 Type of transformation

Hi folks i think this will make little clear What are widget IDs and why do we require them?

Informatica maintains metedata regarding the mappings and its tranformations, 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. Hi folks i think this will make little clear 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. Hi folks i think this will make little clear 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.

How do we access the Metadata tables? While installing the Informatica server a blank Database is assigned to keep information, objects related to Informatica repository and the repository tables. To access these tables we have to use Informatica repository DB schema. Some metadata tables and there details :-

To get better understanding at metadata tables, following are the details of some of the tables can be used for development related process :Table OPB_SUBJECT keeps information about Folders in a repository. This have columns like folder name (column name SUBJ_NAME) , owner of folder, folder properties etc. Tables OPB_SRC and OPB_SRC_FLD keeps details of source definitions created or imported, like source name, column names, data type etc Table OPB_TARG and OPB_TARG_FLD keeps details of target definitions created or imported, as column names, data type etc OPB_MAPPING table have details about mapping like mapping name , validity of mapping, id of folder I which mapping resides, last date mapping changed/saved etc. OPB_WIDGET table keeps details about transformations like transformation names ( widget_name), transformation_type (widget_type) etc. (Note :- Informatica internally calls the Transformations as Widgets.) OPB_WFLOW_RUN keeps details for workflow run like workflow name, workflow run start time, workflow run complete time etc. Some Example :Example, some simple queries on how can we use these metadata tables : For Checking invalid Mapping in a folder :select mapping_name from ') and is_valid = 0 -- for invalid mapping 0* --**This query will return the name of all the mappings which are invalid in the folder specified.

Informatica OPB table which have gives source table and the mappings and folders using an sql query

SQL query

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;

PowerCenter Repository The PowerCenter Repository is one of best metadata storage among all ETL products. The repository is sufficiently normalized to store metadata at a very detail level; which in turn means the Updates to therepository are very quick and the overall Team-based Development is smooth. The repository data structure is also useful for the users to do analysis and reporting. Accessibility to the repository through MX views and SDK kit extends the repositories capability from a simple storage of technical data to a database for analysis of the ETL metadata. PowerCenter Repository is a collection of 355 tables which can be created on any major relational database. The kinds of information that are stored in the repository are, 1. 2. 3. 4. 5. Repository configuration details Mappings Workflows User Security Process Data of session runs

For a quick understanding, When a user creates a folder, corresponding entries are made into table OPB_SUBJECT; attributes like folder name, owner id, type of the folder like shared or not are all stored. When we create\import sources and define field names, datatypes etc in source analyzer entries are made into opb_src and OPB_SRC_FLD. When target and related fields are created/imported from any database entries are made into tables like OPB_TARG and OPB_TARG_FLD. Table OPB_MAPPING stores mapping attributes like Mapping Name, Folder Id, Valid status and mapping comments. Table OPB_WIDGET stores attributes like widget type, widget name, comments etc. Widgets are nothing but the Transformations which Informatica internally calls them as Widgets. Table OPB_SESSION stores configurations related to a session task and table OPB_CNX_ATTR stores information related to connection objects. Table OPB_WFLOW_RUN stores process details like workflow name, workflow started time, workflow completed time, server node it ran etc. REP_ALL_SOURCES, REP_ALL_TARGETS and REP_ALL_MAPPINGS are few of the many views created over these tables. PowerCenter applications access the PowerCenter repository through the Repository Service. The Repository Service protects metadata in the repository by managing repository connections and using object-locking to ensure object consistency. We can create a repository as global or local. We can go forglobal to store common objects that multiple developers can use through shortcuts and go for local repository to perform of development mappings and workflows. From a local repository, we can create shortcuts to

objects in shared folders in the global repository. PowerCenter supports versioning. A versioned repository can store multiple versions of an object.check another query where if have to retrieve all the transformation and ports within those transformation which use a specific lookups. there is a reusable lookup with name LKP_NISHEET which is being used across the mappings and before making change in that lookup, fetch all the dependencies for this lookup. So query will be: SELECT DISTINCT OPB_WIDGET_FIELD.WIDGET_ID WIDGET_ID, OPB_WIDGET_FIELD.FIELD_NAME FIELD_NAME, OPB_EXPRESSION.EXPRESSION EXPRESSION FROM OPB_WIDGET_EXPR, OPB_EXPRESSION, OPB_WIDGET_FIELD, REP_FLD_DATATYPE, OPB_WIDGET WHERE OPB_WIDGET_FIELD.WIDGET_ID = OPB_WIDGET.WIDGET_ID AND OPB_WIDGET_FIELD.VERSION_NUMBER = OPB_WIDGET.VERSION_NUMBER AND OPB_WIDGET.IS_VISIBLE = 1 AND OPB_WIDGET_FIELD.WIDGET_ID= OPB_WIDGET_EXPR.WIDGET_ID AND OPB_WIDGET_FIELD.FIELD_ID= OPB_WIDGET_EXPR.OUTPUT_FIELD_ID AND OPB_WIDGET_EXPR.WIDGET_ID=OPB_EXPRESSION.WIDGET_ID AND OPB_WIDGET_EXPR.EXPR_ID=OPB_EXPRESSION.EXPR_ID AND OPB_EXPRESSION.LINE_NO = 1 AND OPB_WIDGET_EXPR.VERSION_NUMBER = OPB_EXPRESSION.VERSION_NUMBER AND OPB_WIDGET_EXPR.VERSION_NUMBER = OPB_WIDGET_FIELD.VERSION_NUMBER AND UPPER(EXPRESSION) LIKE %LKP_NST% ; retrieved only expression and ports ID (widget_id) from above query. retrieve the mapping name where these fields are being used: WITH MAPP AS (SELECT MAPPING_ID,MAPPING_NAME FROM OPB_MAPPING ), INST AS (SELECT WIDGET_ID,WIDGET_TYPE,MAPPING_ID,INSTANCE_ID,INSTANCE_NAME FROM OPB_WIDGET_INST), Widget AS (SELECT DISTINCT OPB_WIDGET_FIELD.WIDGET_ID WIDGET_ID, OPB_WIDGET_FIELD.FIELD_NAME FIELD_NAME, OPB_EXPRESSION.EXPRESSION EXPRESSION FROM OPB_WIDGET_EXPR, OPB_EXPRESSION, OPB_WIDGET_FIELD, REP_FLD_DATATYPE, OPB_WIDGET WHERE OPB_WIDGET_FIELD.WIDGET_ID = OPB_WIDGET.WIDGET_ID AND OPB_WIDGET_FIELD.VERSION_NUMBER = OPB_WIDGET.VERSION_NUMBER AND OPB_WIDGET_FIELD.WIDGET_ID= OPB_WIDGET_EXPR.WIDGET_ID AND OPB_WIDGET_FIELD.FIELD_ID= OPB_WIDGET_EXPR.OUTPUT_FIELD_ID AND OPB_WIDGET_EXPR.WIDGET_ID=OPB_EXPRESSION.WIDGET_ID AND OPB_WIDGET_EXPR.EXPR_ID=OPB_EXPRESSION.EXPR_ID AND OPB_WIDGET_EXPR.VERSION_NUMBER = OPB_EXPRESSION.VERSION_NUMBER AND OPB_WIDGET_EXPR.VERSION_NUMBER = OPB_WIDGET_FIELD.VERSION_NUMBER AND UPPER(EXPRESSION) LIKE %LKP_NISHEET%) SELECT DISTINCT MAPP.MAPPING_NAME,INST.INSTANCE_NAME,Widget.FIELD_NAME,Widget.EXPRESSION

FROM MAPP,INST,Widget WHERE MAPP.MAPPING_ID = INST.MAPPING_ID AND INST.WIDGET_ID = Widget.WIDGET_ID

Following is the query to know workflow, session, mapping names in a particular folder by passing folder name as an input from repository tables in informatica. SELECT F.SUBJ_NAME AS FOLDER_NAME, WF.TASK_NAME AS WORKFLOW_NAME, SE.INSTANCE_NAME AS SESSION_NAME, M.MAPPING_NAME FROM OPB_SUBJECT F, OPB_TASK WF, (SELECT WORKFLOW_ID, INSTANCE_ID, TASK_ID, TASK_TYPE, INSTANCE_NAME, MAX(VERSION_NUMBER) FROM OPB_TASK_INST SESS WHERE SESS.TASK_TYPE=68 GROUP BY WORKFLOW_ID,INSTANCE_ID,TASK_ID,TASK_TYPE,INSTANCE_NAME) SE, (SELECT SESSION_ID,MAPPING_ID,MAX(VERSION_NUMBER) FROM OPB_SESSION GROUP BY SESSION_ID,MAPPING_ID) S, OPB_MAPPING M WHERE WF.IS_VISIBLE = 1 AND WF.SUBJECT_ID = F.SUBJ_ID AND SE.WORKFLOW_ID = WF.TASK_ID AND WF.TASK_TYPE = 71 AND SE.TASK_ID = S.SESSION_ID AND S.MAPPING_ID = M.MAPPING_ID AND M.IS_VISIBLE = 1 AND F.SUBJ_NAME = 'FOLDER_NAME' select S.SUBJ_NAME FOLDER, M.MAPPING_NAME mapping, M.VERSION_NUMBER VERSION_NUMBER, case when M.IS_VALID = 1 then 'YES' else 'NO' end IS_VALID, M.LAST_SAVED SAVED_ON, M.CHECKOUT_USER_ID, M.COMMENTS from OPB_MAPPING M, OPB_SUBJECT S where M.SUBJECT_ID = S.SUBJ_ID and is_visible = 1 order by 1, 2, 3;

How to find all the mappings and sessions which have PARALLEL hints in the SQL OverrideSELECT S.SUBJ_NAME, M.MAPPING_NAME, W.WIDGET_NAME, A.WIDGET_ID, W.VERSION_NUMBER, SUBSTR(A.ATTR_VALUE, 1, 60) ATTR_VALUE FROM OPB_WIDGET_ATTR A, OPB_WIDGET W, OPB_SUBJECT S, OPB_WIDGET_INST I, OPB_MAPPING M WHERE A.WIDGET_ID = W.WIDGET_ID AND W.IS_VISIBLE = 1 AND A.VERSION_NUMBER = W.VERSION_NUMBER AND A.WIDGET_TYPE IN(2, 3, 11) --Limit to Src/Tgt/Lkp Transformations AND W.WIDGET_ID = I.WIDGET_ID AND W.VERSION_NUMBER = I.VERSION_NUMBER AND I.MAPPING_ID = M.MAPPING_ID AND I.VERSION_NUMBER = M.VERSION_NUMBER AND W.SUBJECT_ID = S.SUBJ_ID AND UPPER(A.ATTR_VALUE) LIKE '%PARALLEL%' UNION SELECT S.SUBJ_NAME, W.TASK_NAME||'.'||TI.INSTANCE_NAME TASK_NAME, 'SQL Override' WIDGET_NAME, A.SESS_WIDG_INST_ID, TI.VERSION_NUMBER, SUBSTR(A.ATTR_VALUE, 1, 60) ATTR_VALUE FROM OPB_SWIDGET_ATTR A, OPB_TASK_INST TI, OPB_TASK W, OPB_SUBJECT S WHERE A.SESSION_ID = TI.TASK_ID AND A.VERSION_NUMBER = TI.VERSION_NUMBER AND TI.WORKFLOW_ID = W.TASK_ID AND TI.VERSION_NUMBER = W.VERSION_NUMBER

AND W.IS_VISIBLE = 1 AND W.SUBJECT_ID = S.SUBJ_ID AND UPPER(A.ATTR_VALUE) LIKE '%PARALLEL%' ORDER BY 1, 2, 3, 4;

How to turn on Write Backward Compatible Session Log File for all session tasks in a folderUPDATE OPB_TASK_ATTR A SET A.ATTR_VALUE=1 WHERE A.ATTR_ID=17 -- WBCSLF -- 102 Write performance data to repository -- 108 Collect performance data -- 105 Enable high precision AND EXISTS ( SELECT 0 FROM OPB_TASK T, OPB_SUBJECT S WHERE T.TASK_ID = A.TASK_ID AND T.VERSION_NUMBER = A.VERSION_NUMBER AND T.IS_VISIBLE = 1 AND T.SUBJECT_ID = S.SUBJ_ID AND S.SUBJ_NAME LIKE '%Sample%' ) -- AND A.INSTANCE_ID = 0 -- Reusable Session Only ;

What are today's long-running tasksselect -- the SRC_ROWS may look big if joiner is used T.SUBJECT_AREA, T.INSTANCE_NAME, TRUNC(AVG(END_TIMESTART_TIME)*24, 2) RUN_HOUR, MIN(T.START_TIME) START_TIME,

SUM(L.SRC_SUCCESS_ROWS) SRC_ROWS, SUM(L.TARG_SUCCESS_ROWS) TGT_ROWS from REP_TASK_INST_RUN T, OPB_SESS_TASK_LOG L where T.run_err_code=0 and (T.END_TIME-T.START_TIME)>= 1/24 and T.START_TIME >= TRUNC(SYSDATE)-2/24 and T.INSTANCE_ID = L.INSTANCE_ID GROUP BY T.SUBJECT_AREA, T.INSTANCE_NAME Order By RUN_HOUR desc;

Inside the Expression Transformationselect S.SUBJ_NAME, W.WIDGET_NAME, F.WIDGET_ID, F.FIELD_NAME, F.FIELD_ID, E.EXPR_ID, E.VERSION_NUMBER, E.EXPRESSION from OPB_WIDGET W, OPB_SUBJECT S, OPB_WIDGET_FIELD F, OPB_WIDGET_EXPR R, OPB_EXPRESSION E where W.SUBJECT_ID=S.SUBJ_ID and W.WIDGET_ID=F.WIDGET_ID and W.WIDGET_ID=R.WIDGET_ID AND F.FIELD_ID=R.OUTPUT_FIELD_ID and W.WIDGET_ID=E.WIDGET_ID AND R.EXPR_ID=E.EXPR_ID and W.VERSION_NUMBER = F.VERSION_NUMBER and F.VERSION_NUMBER = R.VERSION_NUMBER and R.VERSION_NUMBER = E.VERSION_NUMBER and W.IS_VISIBLE = 1 and w.WIDGET_NAME like 'EXP_SAMPLE%' order by S.SUBJ_ID, W.WIDGET_ID, F.FIELD_ID;

Which session populates the specific target tableselect SUBJECT_AREA, SESSION_NAME,TARGET_NAME, MAX(SUCC_ROWS) AS ROWS#, TYPE_ID, COUNT(1) SAMPLE# from ( select SUBJECT_AREA, SESSION_INSTANCE_NAME SESSION_NAME,

TYPE_ID, SUCCESSFUL_AFFECTED_ROWS SUCC_ROWS, TABLE_NAME TARGET_NAME from PM_REPO.REP_SESS_TBL_LOG WHERE TYPE_ID in (2) -- Target Only and END_TIME >= TRUNC(SYSDATE-40) and SUCCESSFUL_AFFECTED_ROWS > 0 and TABLE_NAME like :TGT_NAME||'%' ESCAPE '\' ) Group By SUBJECT_AREA, SESSION_NAME, TARGET_NAME, TYPE_ID Order By SUBJECT_AREA, TARGET_NAME, SESSION_NAME ;

How to avoid re-generating & re-transporting ABAP program after slightly changing the mappingCR 29233 and 63134 have been opened to have fix this problem. -- Find the current LAST_SAVED and UTC_LAST_SAVED select m.Mapping_ID, m.VERSION_NUMBER, m.Last_Saved, m.UTC_Last_Saved, v.User_ID, v.LAST_SAVED, v.UTC_LAST_SAVED, v.COMMENTS, p.PROGRAM_NAME, p.INSTALL_TIME, p.VERSION_NUMBER ABAP_VERSION_NUM from opb_mapping m, OPB_VERSION_PROPS v, opb_program_info p where m.MAPPING_ID = v.OBJECT_ID and v.OBJECT_TYPE = 21 and m.SUBJECT_ID = v.SUBJECT_ID and m.VERSION_NUMBER = v.VERSION_NUMBER and m.MAPPING_ID = p.MAPPING_ID(+) and m.SUBJECT_ID = p.SUBJECT_ID(+) nd m.VERSION_NUMBER = p.VERSION_NUMBER(+)

and m.MAPPING_NAME = :MAP_NAME o rder by m.version_number; Then modify the LAST_SAVED, UTC_LAST_SAVED in OPB_VERSION_PROPS and OPB_MAPPING first; then modify the VERSION_NUMBER in OPB_PROGRAM_INFO if necessary.

--The timsstamp below is just a sample update OPB_VERSION_PROPS v set last_saved='12/05/2008 09:10:11', UTC_LAST_SAVED=1228363499 where v.OBJECT_ID = :MAP_ID and version_number = :VER_NUM and object_type = 21;

update opb_mapping m set last_saved='12/05/2008 09:10:11', UTC_LAST_SAVED=1228363499 where MAPPING_ID = :MAP_ID and version_number = :VER_NUM;

update opb_program_info set VERSION_NUMBER = :VER_NUM where mapping_id = :MAP_ID and subject_id = :SUB_ID;

Link from EXP_FROM.PORT_NAME to ???select S.SUBJ_NAME, WF.INSTANCE_NAME ||'.'|| F.FIELD_NAME FROM_NAME, F.WIDGET_ID, F.FIELD_ORDER, F.FIELD_ID, WT.INSTANCE_NAME ||'.'|| T.FIELD_NAME TO_NAME, T.WIDGET_ID, T.FIELD_ORDER, T.FIELD_ID from OPB_WIDGET Z, OPB_WIDGET_INST WF, OPB_WIDGET_INST WT, OPB_WIDGET_FIELD F, OPB_WIDGET_FIELD T, OPB_WIDGET_DEP D, OPB_SUBJECT S where Z.SUBJECT_ID = S.SUBJ_ID

and Z.IS_VISIBLE = 1 and Z.WIDGET_ID = F.WIDGET_ID and Z.WIDGET_ID = WF.WIDGET_ID and Z.RU_VERSION_NUMBER = WF.VERSION_NUMBER and WF.REF_VERSION_NUMBER = F.VERSION_NUMBER and WF.VERSION_NUMBER = D.VERSION_NUMBER and WF.MAPPING_ID = D.MAPPING_ID and WF.INSTANCE_ID = D.FROM_INSTANCE_ID and F.FIELD_ID = D.FROM_FIELD_ID and D.TO_INSTANCE_ID = WT.INSTANCE_ID and D.TO_FIELD_ID = T.FIELD_ID and D.MAPPING_ID = WT.MAPPING_ID and D.VERSION_NUMBER = WT.VERSION_NUMBER and WT.WIDGET_ID = T.WIDGET_ID and WT.REF_VERSION_NUMBER = T.VERSION_NUMBER and Z.WIDGET_NAME like 'EXP_FROM%' and F.FIELD_NAME like 'PORT_NAME%' order by F.FIELD_ID;

How the connection values is set at session levelselect x.WORKFLOW_ID , t.TASK_ID, t.TASK_NAME, b.INSTANCE_ID, b.INSTANCE_NAME, b.SESS_WIDG_INST_ID, x.CONNECTION_NUM, x.CONNECTION_TYPE, x.CONNECTION_ID, x.CONNECTION_VALUE, c.OBJECT_NAME from opb_session s, opb_task t, OPB_SWIDGET_INST b, OPB_SESS_CNX_VALS x, opb_cnx c

where c.OBJECT_ID(+) = x.CONNECTION_ID and s.MAPPING_ID = b.MAPPING_ID and s.SESSION_ID = b.SESSION_ID and s.SESSION_ID = t.TASK_ID and s.SESSION_ID = x.SESSION_ID and b.SESS_WIDG_INST_ID = x.SESS_WIDG_INST_ID and t.SUBJECT_ID = :SUBJ_ID and b.INSTANCE_NAME like :WIDGET_NAME -Source/Target and t.TASK_NAME like :SESS_NAME order by t.task_name, b.SESS_WIDG_INST_ID;

Find Transformation Attribute Override at Session Levelselect f.SUBJ_NAME Folder, t.task_name SESSION_NAME, i.INSTANCE_NAME, o.OBJECT_TYPE_NAME, a.* from opb_swidget_attr a, OPB_SWIDGET_INST i, OPB_WIDGET w, OPB_OBJECT_TYPE o, opb_task t, opb_subject f where a.attr_value in (:VALUE1, :VALUE2, :VALUE3) and i.SESSION_ID = a.SESSION_ID and i.SESS_WIDG_INST_ID = a.SESS_WIDG_INST_ID and i.WIDGET_ID = w.WIDGET_ID and i.WIDGET_TYPE = w.WIDGET_TYPE and i.WIDGET_TYPE = o.OBJECT_TYPE_ID and i.SESSION_ID= t.task_id and t.SUBJECT_ID= f.subj_id;

List all the Transformations in a given MappingIncluding the transformations within the mapplet WITH M AS (

select M.SUBJECT_ID, M.MAPPING_ID from OPB_MAPPING M, OPB_SUBJECT S where S.SUBJ_ID = M.SUBJECT_ID and S.SUBJ_NAME LIKE :Folder_Name and M.MAPPING_NAME like :Mapping_Name ) select O.OBJECT_TYPE_NAME, W.INSTANCE_NAME, W.COMMENTS from OPB_WIDGET_INST W, OPB_OBJECT_TYPE O, M where O.OBJECT_TYPE_ID = W.WIDGET_TYPE and O.OBJECT_TYPE_NAME NOT IN ('Mapplet') and W.MAPPING_ID = M.MAPPING_ID union select O.OBJECT_TYPE_NAME, W.INSTANCE_NAME, W.COMMENTS from OPB_WIDGET_INST W, OPB_OBJECT_TYPE O, M where O.OBJECT_TYPE_ID = W.WIDGET_TYPE and O.OBJECT_TYPE_NAME NOT IN ('Mapplet', 'Output Transformation', 'Input Transformation') and W.MAPPING_ID in ( select X.MAPPING_ID from OPB_WIDGET_INST W, OPB_OBJECT_TYPE O, M, OPB_MAPPING X where W.MAPPING_ID = M.MAPPING_ID and O.OBJECT_TYPE_ID = W.WIDGET_TYPE and O.OBJECT_TYPE_NAME = 'Mapplet' and X.REF_WIDGET_ID = W.WIDGET_ID ) order by 1,2 ;


Recommended