Importing Source Metadata

Importing Source Metadata

In this lesson you will define the structure of the source objects, the first step towards your warehouse design. Using the OWB Import Wizards, you will learn how Warehouse Builder uses different methods for obtaining metadata from relational tables and flat files.

Warehouse Builder 10g Release 1 (10.1), provides support for Oracle Database 10g sources and targets.

Topics

This lesson will discuss the following:

Overview
Prerequisites
Creating a Flat File Source Module

Importing Flat File Metadata

Creating an Oracle Source Module
Importing Table Metadata
Summary

 

This lesson will take approximately 60 minutes to complete.

Move your mouse over this icon to show all screenshots. You can also move your mouse over each individual icon to see only the screenshot associated with it.


Overview

This lesson focuses on how to use Oracle Warehouse Builder to create source modules. You will create a source module for flat files and one source module for relational database. After creating the source objects you will specify source data for the source modules. Finally you will learn how to import source object metadata into the source modules.

Back to Topic List

Back to Topic List

In order for this lesson to work successfully, you will need to have performed the following:

1.

Completed Overview lesson.

2.

Completed Logging in to OWB lesson

 

Creating a Flat File Source Module

Back to Topic List

Sometimes your data may be stored in flat files. In this topic you will create a source module for flat files using the New Module Wizard.

1.

Expand the OWB10g_DEMO project. Expand the Files node.

Move your mouse over this icon to see the image

 

2.

Right click the Files node and select Create Flat File Module

Move your mouse over this icon to see the image

 

3.

Click Next on the New Module Wizard: Welcome page. Name the module DQ_SOURCE. Accept Development as the module status and click Next.

Move your mouse over this icon to see the image

The drop-down list for module status has three options: Development, Quality Assurance, and Production. This is used for documentation purposes only.

 

4.

In the Connection Information window you specify the directory where the files you want to import into Warehouse Builder resides. Click Browse....

Move your mouse over this icon to see the image

 

5.

In the Flat File Directory Chooser window, from the Drives drop-down list select (C:\) navigate to the folder OWB-OBE, and select folder DQ if you have saved the setup files under C drive as instructed in Lesson 1. If you have saved the setup files elsewhere, locate and select the folder DQ. This folder contains the source definitions, which you will import. Click OK in the Flat file Directory Chooser window.

Move your mouse over this icon to see the image

The Connection Information window reappears with the selected path displayed. Click Next.

Move your mouse over this icon to see the image

 

6.

Locations define information about the database schema or target tool where you will be deploying objects.

To create a new Location: Click New.

Move your mouse over this icon to see the image

The New Location Dialog window appears. Type DQ_SOURCE_LOC for the name. The Type File System is selected depending on the type of the module for which you are creating the location. Click Ok to close the New Location Dialog window.

Move your mouse over this icon to see the image

 

7.

In the Finish window review the definitions you have specified. Check the box - Proceed to the Import Metadata Wizard and click Finish.

Move your mouse over this icon to see the image

In the next topic you will learn how to use the Import Metadata Wizard.

 

 

Importing Flat File Metadata

Back to Topic List

In this topic you will learn to import metadata into a Flat File source module using the Import Metadata Wizard.

1.

Click Next on the Import Metadata Wizard: Welcome page. In the Filter Information window accept the default selection All Data Files and click Next.

Move your mouse over this icon to see the image

 

 

2.

In the Object Selection window expand C:\OWB-OBE\\DQ node or the location where you unzipped the setup files will be displayed. Use >> to move all file definitions to the right hand side.

Move your mouse over this icon to see the image

Move your mouse over this icon to see the image

All the files you select and move to the right hand side will be imported into Warehouse Builder. Click Next.

 

3.

The Summary and Import page appears. Select the first record, (customers_system3_txt) if it is not already selected.

On this page you see two file definitions (customers_system3_txt and customers_system4_txt) prefixed with a red ball indicator. The red ball indicator indicates that there is no metadata available for these files. Before importing, Warehouse Builder needs to know the structure of these files. Through the sampling process, information about the structure is gathered.

You will learn how to sample the customers_system3.txt file first, followed by the customers_system4.txt.

Click Sample.

Move your mouse over this icon to see the image

 

4.

Click Next on the Flat File Sample Wizard: Welcome page.The Flat File Sample Wizard: Name page appears. On this page you specify the file's name and the number of rows to sample. Warehouse Builder offers a nearly endless set of character sets you could use to read the data.

Accept the default sampled file's name. This is the name Warehouse Builder will refer to the file after the import. Accept the default number of rows to sample as 200. Click Next.

Move your mouse over this icon to see the image

 

 

5.

The Flat File Sample Wizard: Record Organization page appears. You use Record Organization page to indicate how records are organized in the file that you are sampling.

Accept the default option of Records delimited by carriage return (<CR>) and click Next.

Move your mouse over this icon to see the image

 

 

6.

In the Flat file Sample Wizard: File Layout page, accept the default values of 0 for Skip rows. This file is an example of a single record type file, select Single for Record Type and click Next.

On this page you can specify the number of rows to skip. Warehouse Builder also supports multiple file record types.

Move your mouse over this icon to see the image

 

 

7.

The Flat File Sample Wizard: File Format page appears. On this page you specify the formatting for the file structure. Fixed length files as well as character-separated files are supported.

Select Delimited and click Next.

Move your mouse over this icon to see the image

 

 

8.

The Flat File Sample Wizard: Field Properties page appears. Select Use the first record as the field names. You can choose to use the values in the first record for the field names, when the flat files first record is a header.

Move your mouse over this icon to see the image

Notice that some of the data types now have changed. Without the column names, some values are actually numeric. Click Next.

Move your mouse over this icon to see the image

 

9.

Review the summary specifications after sampling the file customer_system_3.txt. Click Finish on the Flat File Sample Wizard: Summary page.

Move your mouse over this icon to see the image

 

 

10.

The Import Metadata Wizard: Summary and Import page reappears. The wizard has now completed the sampling process (identifying the structure) for the customers_system3_txt file, which is indicated by the green ball indicator.

The selected record (customers_system4_txt) has a red light next to it indicating it needs to be sampled.

Move your mouse over this icon to see the image

 

11.

Before you finish, ensure there is a green ball indicator next to every file to know that Warehouse Builder knows the structure for each of the files.

The customers_system4_txt file is selected. To sample customers_system4_txt file, you can follow the above step number 3 to 10, instead to save time you can select Same As customers_system3_txt from the Same As drop-down box. (You must use the Same As option when the file to be sampled is similar in structure to any of the previously sampled files). Click Finish in the Import Metadata Wizard: Summary and Import page to complete the import.

Move your mouse over this icon to see the image

Move your mouse over this icon to see the image

 

 

12.

After you have sampled both the files, expand the DQ_SOURCE module under the Files node. You will see that metadata from the flat files has been imported.

Move your mouse over this icon to see the image

 

Creating an Oracle Source Module

Back to Topic List

You have learnt how to create a source module for defining flat-file sources. In this topic, you will learn to create a source module for defining a relational table source.

1.

In the OWB10g_DEMO project, expand Databases, select the Oracle node.

Right click the Oracle node. Select Create Oracle Module, and click Next on the New Module Wizard: Welcome page if it appears.

Move your mouse over this icon to see the image

 

 

2.

The New Module Wizard: Name page appears. Name the module NA_SOURCE. Accept the default selection Development for module status. Select Data Source as the module type. Click Next

Move your mouse over this icon to see the image

 


3.

The New Module Wizard: Data Source Information page appears. Accept the default selection Generic Oracle Database Application and Oracle Database 8i/9i/10g. Click Next.

Move your mouse over this icon to see the image

 

4.

The New Module Wizard: Connection Information page appears. On this page you specify what the source of the metadata is going to be. Select Oracle Data Dictionary to import metadata from an Oracle database.

You can select from an existing database link or create a new link. You will now learn to create a new link. Select New DB Link...

Move your mouse over this icon to see the image

When you create a source module for a database source, you create or select a database link in the Warehouse Builder repository that points to the source system. Warehouse Builder uses this link to access the data dictionary of the source.

 

5 .

The New Database Link dialog appears. You will specify the details for the link. Type NA_SOURCE for DB Link Name. Select the Host Name radio button and provide the following information. Type localhost or <name of your computer> as hostname, Port number: 1521, Oracle Service Name: use obeowb or <your database service name>. For username and password, type NA_SOURCE.

Click Create and Test. The connection information you provided is tested, and a message will display Testing Successful... Click OK to go back to the New Module Wizard: Connection Information page.

Move your mouse over this icon to see the image

You will notice the link that you created is selected and other details are displayed. Click Next.

Move your mouse over this icon to see the image

 

6 .

The New Module Wizard: Location page appears. On this page you create a new location or choose from a drop-down list of previously specified locations. To define a new location, click New....

Move your mouse over this icon to see the image

Type NA_SOURCE_LOC for Name, select Oracle Database for Type and 10.1 for Version. Click OK.

Move your mouse over this icon to see the image

The New Module Wizard: Location page reappears with the new location displayed. Click Next.

Move your mouse over this icon to see the image

 

7 .

In the New Module Wizard: Finish page review the definitions you have specified. Check the box - Proceed to the Import Metadata Wizard and click Finish.

Move your mouse over this icon to see the image

In the next topic you will learn how to Proceed with the Import Metadata Wizard.

 

 

Importing Table Metadata

Back to Topic List

In this topic you will learn how to use OWB Import Metadata Wizard to import source metadata from an Oracle relational database schema.

1.

Click Next in the Import Metadata Wizard: Welcome page.

The Import Metadata Wizard: Filter Information page appears. On this page you select the type of the objects that you want to import to the Warehouse Builder source design. For this example deselect all other selection, ensure only Table is selected as the object type. Click Next.

Move your mouse over this icon to see the image

 

2.

The Import Metadata Wizard: Object Selection page appears. Expand TABLE and use the ( >) or (>>) arrow buttons to move the selected objects or all objects from the Available Objects list to the Selected Objects list.

Move both the tables to the right hand side using >>.

Move your mouse over this icon to see the image

Click Next.

Move your mouse over this icon to see the image


3.

The Import Metadata Wizard: Summary and Import page appears. Verify that you have selected all the objects you want to import into Warehouse Builder. Click Finish. Warehouse Builder will import all definitions, including constraints (if any). Review the definitions Warehouse Builder created.

Move your mouse over this icon to see the image

Clicking Finish starts the metadata import process an Importing Progress Dialog appears.

Move your mouse over this icon to see the image

Click OK in the Import Results window to import the table definitions. You have now completed the import of the Oracle database definitions.

Move your mouse over this icon to see the image


4.

In the Oracle Warehouse Builder client, examine the imported metadata. Expand the NA_SOURCE module and examine the metadata that is imported for the tables.

Move your mouse over this icon to see the image

 

Summary

Back to Topic List

In this module you should have learned how to:

Create source modules
  Creating a Flat File Source Module
  Creating a Database Source Module
Configure Connection Information for Database Sources by creating a database link
Create Definitions for Flat File Sources
Import Definitions from a Database

Move your mouse over this icon to hide all screenshots

 

 

 

E-mail this page
Printer View Printer View
Oracle Is The Information Company About Oracle | Oracle RSS Feeds | Careers | Contact Us | Site Maps | Legal Notices | Terms of Use | Privacy