Case Studies Oracle Fusion Middleware Online Documentation Library

3-2 Oracle® Fusion Middleware Knowledge Module Developer’s Guide for Oracle Data Integrator 2. Load the SNP_REV tables. This is performed using three main patterns: ■ Retrieve metadata from the metadata provider and load them into to SNP_ REV tables. This is the pattern used for example in the RKM Oracle. ■ Retreive metadata from a third party provider. This is the pattern used for example in the RKM File FROM EXCEL. Metadata is not extracted from the files described in the model but from a Micrisift Excel Excel spreadsheet that contains the description of these files. ■ Pre-populate the SNP_REV tables using OdiReverseGetMetadata and then fixenrich this metadata using queries targeting these tables. 3. Call the OdiReverseSetMetaData tool to apply the changes to the current Oracle Data Integrator model. In an RKM, the source and target commands work are follow: ■ The Command on Target specified with an Undefined technology on the Autocommit transaction targets the SNP_REV tables in the repository. ■ The Command on Source specified with an Undefined Schema on the Autocommit transaction retreives data from the data-server containing the data structure to reverse-engineer. If you want to use a metadata provider for example an Excel spreadsheet, you must specify a specific technology and logical schema. ■ Calls to Tools such as OdiReverseSetMetadata are specified in the Command on Target , with the ODI Tools technology.

3.2 Case Studies

This section provides examples of reverse-egineering strategies.

3.2.1 RKM Oracle

The RKM Oracle is a typical example of a reverse-engineering process using a database dictionnary as the metadata provider. The commands below are extracted from the RKM for Oracle and provided as examples. You can review the code of this knowledge module by editing it in Oracle Data Intagrator Studio.

3.2.1.1 Reset SNP_REV Tables

This task resets the content of the SNP_REV tables for the current model. Command on Target ODI Tools OdiReverseResetTable -MODEL==odiRef.getModelID

3.2.1.2 Get Tables

This task retreives the list of tables from the Oracle system tables and loads this content into the SNP_REV tables. Command on Source Select t.TABLE_NAMETABLE_NAME, t.TABLE_NAMERES_NAME, replacet.TABLE_NAME,=odiRef.getModelREV_ALIAS_LTRIM,TABLE_ALIAS, substrtc.COMMENTS,1,250TABLE_DESC, Reverse-Engineering Strategies 3-3 T TABLE_TYPE, t.NUM_ROWSR_COUNT, SUBSTRPARTITIONING_TYPE ,1,1 PARTITIONING_TYPE, SUBSTRSUBPARTITIONING_TYPE,1,1 SUBPARTITIONING_TYPE FromALL_TABLESt, ALL_TAB_COMMENTS tc, ALL_PART_TABLES tp Where ... ... Command on Target insert into SNP_REV_TABLE I_MOD, TABLE_NAME, RES_NAME, TABLE_ALIAS, TABLE_TYPE, TABLE_DESC, IND_SHOW, R_COUNT, PARTITION_METH, SUB_PARTITION_METH values =odiRef.getModelID, :TABLE_NAME, :RES_NAME, :TABLE_ALIAS, T, :TABLE_DESC, 1, :R_COUNT, :PARTITIONING_TYPE, :SUBPARTITIONING_TYPE

3.2.1.3 Get views, partitions, columns, FK, Keys and other Oracle Metadata

Subsequent commands use the same pattern to load the SNP_REV tables from the content of the Oracle system tables.

3.2.1.4 Set Metadata

This task resets the content of the SNP_REV tables for the current model. Command on Target ODI Tools OdiReverseSetMetaData -MODEL==odiRef.getModelID 3-4 Oracle® Fusion Middleware Knowledge Module Developer’s Guide for Oracle Data Integrator 4 Data Integrity Strategies 4-1 4 Data Integrity Strategies This chapter explains the data integrity strategies used for performing flow and static checks. These strategies are implemented in the Check Knowledge Modules. This chapter contains the following sections: ■ Section 4.1, Data Integrity Check Process