Está en la página 1de 27

Oracle Data Integrator 11g Bootcamp

Lesson 4 : Defining Models and Datastores

T : +44 (0) 8446 697 995 or (888) 631 1410 (USA) E : enquiries@rittmanmead.com W: www.rittmanmead.com

Agenda
Understand the concept of models, model folders and datastores
Create model folders
Create and reverse-engineer models from relational, XML and file sources
Set dimensional properties for a datastore

T : +44 (0) 8446 697 995 or (888) 631 1410 (USA) E : enquiries@rittmanmead.com W: www.rittmanmead.com

Datastores, Models and Model Folders


Datastores are data structures
Defined using the Models panel in the Designer navigator
Can represent a table, a flat file, a message queue, element from an XML file
Or any other data structure accessible from ODI
Describes data in a tabular format,
made up of columns
Models are collections of data stores,
from a single data server
Can be organized into Model Folders
Can also contain diagrams and hierarchies
Abstracted way of representing tables, schemas
and columns

T : +44 (0) 8446 697 995 or (888) 631 1410 (USA) E : enquiries@rittmanmead.com W: www.rittmanmead.com

Datastores
Data objects, in tabular form, made up of columns
Definition can either be reverse-engineered (RKM) from the data server source, or
manually created
Files need more definition steps before reversing
Can contain mandatory filters and check constraints
Keys and foreign key links

T : +44 (0) 8446 697 995 or (888) 631 1410 (USA) E : enquiries@rittmanmead.com W: www.rittmanmead.com

Reverse Engineering Model (Datastore) Definitions


Model definitions (datastores and their contents) are usually defined through
reverse-engineering the source data model
Need to define logical, physical and context settings prior to reversing
Need to import the required RKM module into the project
Can do full reverse, or selective reverse

T : +44 (0) 8446 697 995 or (888) 631 1410 (USA) E : enquiries@rittmanmead.com W: www.rittmanmead.com

Keys, Foreign Keys and Constraints


Keys can be defined (or reverse-engineered) for datastores
Usually required by incremental load-type KMs
Foreign keys (reference) can also be defined
Used in KMs, and also for data quality checking

T : +44 (0) 8446 697 995 or (888) 631 1410 (USA) E : enquiries@rittmanmead.com W: www.rittmanmead.com

Model Creation Steps


1. Ensure that all data server, physical and logical models are defined in topology
2. Create Model Folders and Models
3. Reverse-engineer data store definitions into RBDMS models
4. Add any required keys, constraints etc
5. Manually define datastores for non-RKM supported sources
Text files
XML files
etc

T : +44 (0) 8446 697 995 or (888) 631 1410 (USA) E : enquiries@rittmanmead.com W: www.rittmanmead.com

Creating an RDBMS Model Step 1 : Define Model Folders


Select Models panel from Designer navigator
From drop-down menu, select New Model Folder
Name the model folder as required

T : +44 (0) 8446 697 995 or (888) 631 1410 (USA) E : enquiries@rittmanmead.com W: www.rittmanmead.com

Creating an RDBMS Model Step 2 : Define Model


Select the Model Folder to create the Model in
Right-click on it and select New Model
Name the model as required, select Technology and Logical Schema

T : +44 (0) 8446 697 995 or (888) 631 1410 (USA) E : enquiries@rittmanmead.com W: www.rittmanmead.com

Creating an RDBMS Model Step 3 : Reverse Datastore Definitions


With Model definition still open, press the Reverse Engineer button
Use Selective Reverse-Engineering settings for selective reversing
Review progress and final
reversed datastores

T : +44 (0) 8446 697 995 or (888) 631 1410 (USA) E : enquiries@rittmanmead.com W: www.rittmanmead.com

Selective Reverse-Engineering
Use when you only want to import details for a subset of the objects in a schema
Select Selective Reverse-Engineering tab
Then tick Objects to Reverse Engineer tickbox
Place ticks next to objects you wish to include in reverse-engineering

T : +44 (0) 8446 697 995 or (888) 631 1410 (USA) E : enquiries@rittmanmead.com W: www.rittmanmead.com

Creating an RDBMS Model Step 4 : Review Final Datastores


Open Model and view datastore definitions
Review columns and constraints/keys within each datastore

T : +44 (0) 8446 697 995 or (888) 631 1410 (USA) E : enquiries@rittmanmead.com W: www.rittmanmead.com

Importing (Reversing) File Sources and Defining Datastores


File sources (not XML sources, which are self-describing) cannot be immediately
reversed
Data server only points to a directory, not an individual file
Therefore there is an intermediate step required, to select individual file and
describe the properties
Delimited or fixed
Header rows
Other details

T : +44 (0) 8446 697 995 or (888) 631 1410 (USA) E : enquiries@rittmanmead.com W: www.rittmanmead.com

Defining File Datastores Part 1 : Define Model


Right-click on Model Folder and select New Model
Name the model, select File technology and logical schema

T : +44 (0) 8446 697 995 or (888) 631 1410 (USA) E : enquiries@rittmanmead.com W: www.rittmanmead.com

Defining File Datastores Part 2 : Manually Create Datastore


Right-click on new file Model and select New Datastore

T : +44 (0) 8446 697 995 or (888) 631 1410 (USA) E : enquiries@rittmanmead.com W: www.rittmanmead.com

Defining File Datastores Part 3 : Select File for Datastore


Using the Browse button next to the Resource Name field, browse to select the
file that you wish to base the datastore on

T : +44 (0) 8446 697 995 or (888) 631 1410 (USA) E : enquiries@rittmanmead.com W: www.rittmanmead.com

Defining File Datastores Part 4 : Specify File Type


Select fixed-width or delimited
Select number of header lines (used for auto-naming columns)
Select delimiter, if not tab-delimited, and record separator type

T : +44 (0) 8446 697 995 or (888) 631 1410 (USA) E : enquiries@rittmanmead.com W: www.rittmanmead.com

Defining File Datastores Part 5 : Perform Reverse Engineering


Switch to Columns tab, and press Reverse Engineer button
File will then be read, and header row used to define names

T : +44 (0) 8446 697 995 or (888) 631 1410 (USA) E : enquiries@rittmanmead.com W: www.rittmanmead.com

Defining File Datastores Part 6 : Manually Edit Reversed Details


If required, make manual edits to imported detials

T : +44 (0) 8446 697 995 or (888) 631 1410 (USA) E : enquiries@rittmanmead.com W: www.rittmanmead.com

Viewing Data in Datastores


The data within a datastore can be viewed within ODI Studio Navigator
Right-click on datastore and select View Data

T : +44 (0) 8446 697 995 or (888) 631 1410 (USA) E : enquiries@rittmanmead.com W: www.rittmanmead.com

Editing Data in Datastores


For data stores using database (Oracle etc) technologies, data can be edited
Right-click on datastore and select Data
Editing controls become active in data grid display

T : +44 (0) 8446 697 995 or (888) 631 1410 (USA) E : enquiries@rittmanmead.com W: www.rittmanmead.com

Datastore OLAP (Dimensional) Properties


Certain IKMs are capable of handling slowly-changing dimensions and other
dimensional transformations
Datastores can therefore be designated with an OLAP Type
Dimension
Slowly-Changing Dimension
Fact Table
Columns can be designated as having an SCD behavior
Surrogate Key
Natural Key
Overwrite on Change
Add Row on Change
Current Record Flag
Starting Timestamp
Ending Timestamp
T : +44 (0) 8446 697 995 or (888) 631 1410 (USA) E : enquiries@rittmanmead.com W: www.rittmanmead.com

Setting SCD Properties Step 1 : Select OLAP Type for Datastore


Open the datastore for editing, and select the OLAP Type

T : +44 (0) 8446 697 995 or (888) 631 1410 (USA) E : enquiries@rittmanmead.com W: www.rittmanmead.com

Setting SCD Properties Step 2 : Select SCD Behavior for Columns


Then edit each individual column, and set the Slowly Changing Dimensions
Behavior

T : +44 (0) 8446 697 995 or (888) 631 1410 (USA) E : enquiries@rittmanmead.com W: www.rittmanmead.com

Hands-On Labs
Lab 4 : Models

T : +44 (0) 8446 697 995 or (888) 631 1410 (USA) E : enquiries@rittmanmead.com W: www.rittmanmead.com

Summary
Models are analogous to database schemas and contain sets of datastores
Datastores are relational representations of datasets, for a particular technology
All datastores are represented as tables and columns
Datastores can have keys, constraints, filters, etc.
Source metadata is imported through reverse-engineering, or reversing
File sources have additional steps to select file and file structure
Once imported, datastore contents can be viewed, and sometimes edited
For IKMs that do dimensional loads, SCD behavior metadata can also be defined

T : +44 (0) 8446 697 995 or (888) 631 1410 (USA) E : enquiries@rittmanmead.com W: www.rittmanmead.com

Oracle Data Integrator 11g Bootcamp


Lesson 4 : Defining Models and Datastores

T : +44 (0) 8446 697 995 or (888) 631 1410 (USA) E : enquiries@rittmanmead.com W: www.rittmanmead.com

También podría gustarte