PK
;,Aoa, mimetypeapplication/epub+zipPK ;,A iTunesMetadata.plistX
Many companies implement the SAP Enterprise Resource Planning (ERP) system and Oracle Warehouse Builder enables easy access to the data in these SAP systems.
This chapter describes how you can extract data from SAP systems. It describes why you require an SAP connector, how to import metadata from SAP tables, use them in a mapping, generate ABAP code for the mappings, and deploy them to an SAP system. The chapter also describes the various methods by which you can extract data from the SAP system and load this data into a target table on Oracle Warehouse Builder system.
This chapter contains the following topics:
The SAP R/3 system operates differently compared to SQL-based systems like Oracle E-Business Suite and Oracle's PeopleSoft systems.
The major differences include:
The native data manipulation language is ABAP, which is a proprietary SAP language.
Table names are cryptic compared to those in SQL-based ERP systems.
In addition to database tables, SAP contains logical tables called pool tables and cluster tables. These tables contain multiple physical tables and must be managed differently from SQL-based tables.
The SAP connector assists you in managing all these issues. Furthermore, the SAP connector enables you to follow the administrative and security processes of the SAP environment.
For information about the SAP R/3 versions supported by Oracle Warehouse Builder 11g, log in to https://support.oracle.com/
, and go to the Certify link.
This section provides a brief overview of the different types of tables in SAP, and how data is organized within an SAP system. The section consists of the following topics:
With the SAP connector, you can import metadata definitions for the following SAP table types:
Transparent: A transparent table is a database table that stores data. You can access the table from non-SAP systems as well, for example, using SQL statements. However, Oracle Warehouse Builder uses ABAP code to access transparent tables.
Cluster: A cluster table is usually used to store control data. It can also be used to store temporary data or documentation. Because cluster tables are data dictionary tables and not database tables, you can access these tables only by using ABAP.
Pooled: This is a logical table that must be assigned to a table pool in the database. A table pool consists of multiple pooled tables. A pooled table is used to store control data such as program parameters. You require ABAP code to access pooled tables.
SAP application systems logically group tables under different business domains. In SAP, a business domain is an organizational unit in an enterprise that groups product and market areas. For example, the Financial Accounting business domain represents data describing financial accounting transactions. These transactions might include General Ledger Accounting, Accounts Payable, Accounts Receivable, and Closing and Reporting.
When you import SAP definitions, you can use a graphical navigation tree in the Business Domain Hierarchy dialog box to search the business domain structure in the SAP source application. This navigation tree enables you to select SAP tables from the SAP application server.
Moving data from the SAP system to an Oracle database using Oracle Warehouse Builder consists of the following tasks:
Connecting to the SAP system.
Importing metadata from SAP data objects.
Creating an extraction mapping in Oracle Warehouse Builder that defines:
The SAP source tables from which data is to be imported.
The transformation operators that operate on the source tables to extract data based on certain criteria.
The target table in Oracle Warehouse Builder to store the data imported from the SAP source tables.
Deploying the mapping.
This creates the ABAP report for the mapping.
Starting the mapping.
This results in the following sequence of tasks, all of which are performed automatically by Oracle Warehouse Builder:
Transfer of the ABAP report to the SAP server.
Compiling of the ABAP report.
Execution of the ABAP report, which results in the generation of a data file (this file has a .dat
extension).
Transfer of the data file to the Oracle Warehouse Builder server using FTP.
Loading data from the data file into the target table in Oracle Warehouse Builder. The loading takes place using SQL*Loader.
To access SAP data from non-SAP systems, you typically use a function module to execute an ABAP program that extracts the data. A function module in SAP is a procedure that is defined in a special ABAP program known as a function group. After the function group is defined, the function module can then be called from any ABAP program.
SAP contains a predefined function module called RFC_ABAP_INSTALL_AND_RUN
to execute ABAP report. To upload the Oracle Warehouse Builder-generated ABAP report and execute it in SAP, you need access rights to this function module.
Alternatively, you can ask the SAP administrator to create a customized function module that executes a specific ABAP program. You can then use this function module to execute the ABAP report generated by Oracle Warehouse Builder.
Data retrieval from the SAP system can be "Completely Managed by Oracle Warehouse Builder", "Managed by Oracle Warehouse Builder with SAP Verification", or "Manual". This depends on whether the SAP administrator provides the Oracle Warehouse Builder user with access rights to the predefined function module RFC_ABAP_INSTALL_AND_RUN
or creates a customized function module to execute the ABAP report.
Completely Managed by Oracle Warehouse Builder
In this mechanism, Oracle Warehouse Builder has access to upload and execute the generated ABAP using the default function module RFC_ABAP_INSTALL_AND_RUN
, and to use FTP to import the generated data file from the SAP system.
Thus the entire process of retrieving data from the SAP system and creating a target table is managed by the Oracle Warehouse Builder and can be completely automated. It is therefore the simplest method of data retrieval. See "Automated System" for more details on implementing this data retrieval mechanism.
Managed by Oracle Warehouse Builder with SAP Verification
In this mechanism, as an Oracle Warehouse Builder user, you do not have access rights to the default function module RFC_ABAP_INSTALL_AND_RUN
that executes the ABAP report in the SAP system. Instead, the SAP administrator first verifies the ABAP report that you generate using Oracle Warehouse Builder, and then creates a customized function module to execute this ABAP report. You can then run the ABAP code on the SAP system using this customized function module.
See "Semi-Automated System" for more details about implementing this data retrieval mechanism.
Manual
In this mechanism, as a Oracle Warehouse Builder user, you cannot directly run the ABAP code on the SAP system. Instead, you generate the ABAP report for the mapping, and send it to the SAP administrator, who runs the code on the SAP system. You then import the generated data file using FTP and load the target table.
The tasks involved in retrieving data using FTP and creating the Oracle table are implemented using a Process Flow. See "Manual System" for more details about implementing this system.
As a Oracle Warehouse Builder user, you must be aware of certain restrictions while trying to extract data from an SAP system.
Because the SAP and Oracle Warehouse Builder systems are totally independent systems, as an Oracle Warehouse Builder user, you may only have restricted access rights to the SAP data (especially in the production environment). You therefore have to interact with the SAP administrator to extract data from the system.
Access privilege to the SAP system is most often determined by whether it is the development, test, or the production environment. Each of the data retrieval mechanisms can be implemented in the development, test, or production environment depending on the privileges granted by the SAP system administrator.
Development Environment
Typically, in the development environment, the SAP administrator gives you access rights to use the predefined function module RFC_ABAP_INSTALL_AND_RUN
. Therefore, in this environment, you can implement a completely "Automated System" for data retrieval.
Test and Production Environment
Typically, in the test and production environments, the SAP administrator may not give you access rights to use the predefined function module RFC_ABAP_INSTALL_AND_RUN
. Instead, the SAP administrator verifies the ABAP report, and either creates a customized function module that you can use, or runs the ABAP report on the SAP system, and enables you to extract the resultant data. You can therefore implement either a "Semi-Automated System" or a "Manual System" for data retrieval.
A typical data retrieval system may therefore consist of any of the three mechanisms implemented in the different environments.
Scenario 1
You run the automated system in the SAP development environment. After you verify the ABAP report in this environment, you then move the ABAP report to the SAP test environment and test the code using a customized function module. You then finally move this to the SAP production environment.
This implementation is recommended by Oracle, as it automates and simplifies the data retrieval task.
Scenario 2
Depending on the access rights to the development, test, and production environments, you implement any one of the data retrieval mechanisms in each of the environments.
The following sections provide details of the tasks involved in retrieving data from an SAP system:
To connect to the SAP system from Oracle Warehouse Builder, you must use certain SAP-specific DLL files. After you establish connection, you can then import metadata from SAP tables into SAP modules in Oracle Warehouse Builder.
This section contains the following topics:
Different sets of files are required depending on whether you are working on a Windows or a UNIX system.
Files Required in Windows
The SAP connector requires a DLL file named librfc32.dll
to use remote function calls on the client computer. You must copy librfc32.dll
to the location specified in java.library.path
on your client system.
To find this location, click MyComputer, Properties, and then click Advanced. Next click Environment Variables, and under System variables, check the locations specified for the variable Path.
You can copy the librfc32.dll
file to any one of the multiple locations specified in Path. One of the locations correspond to OWB_HOME
, and is therefore the preferred location. This location is usually OWB_HOME
\owb\bin
.
See Table 7-1 for the list of files required in Windows.
Table 7-1 Required Files for Windows
Required Files | Path | Description |
---|---|---|
|
|
This file is available on the SAP Application Installation CD. |
|
|
Copy this file to the same location where you placed |
|
|
Restart the client after copying these files.
Files Required in UNIX
The SAP connector requires a DLL file named librfccm.so
to use remote function calls on the client computer. You must copy this file to the location specified by the UNIX environment variable path LD_LIBRARY_PATH
on your client system.
By default, OWB_HOME
/owb/bin/admin
is the location specified in LD_LIBRARY_PATH. If it is not, then ensure that you add OWB_HOME
\owb\bin\admin
to LD_LIBRARY_PATH.
See Table 7-2 for the list of files required in UNIX.
Table 7-2 Required Files for UNIX
Required Files | Path | Description |
---|---|---|
|
|
This file is available on the SAP Application Installation CD. |
|
|
Copy this file to the same location where you placed |
|
|
Restart the client after copying these files.
Note: Different versions of SAP R/3 might require different versions of the DLL, SO, and JAR files. The correct versions are available in the SAP installation CD. The files can also be downloaded from: |
The most common errors while connecting to the SAP system are listed in Table 7-3:
Table 7-3 SAP Connection Errors
Error Message | Possible Reason |
---|---|
Connection failed.You are not authorized to logon to the target system (error code 1). |
Incorrect user name or password to connect to the SAP server. |
Connection failed. Connect to SAP gateway failed. |
Incorrect application server, system number, or client details. |
Some Location Details are missing. Please verify the location information is completely specified. |
Missing DLL files, or DLL files placed in the wrong location. |
Missing |
Missing |
Note: If you create the SAP source module and import SAP tables but cannot see the columns in the tables, then you have an incompatiblelibrfc32.dll file. Download the correct version of the DLL file from the SAP Web site. |
Use the Create Module Wizard to create the SAP source module that stores data from the SAP source.
To create a SAP Module:
Right-click SAP and select New SAP.
The Create Module Wizard is displayed.
On the Name and Description page, provide a name for the SAP module. Select the module status and optionally also provide a description. Click Next.
On the Connection Information page, either select from an existing location or click Edit to open the Edit SAP Location dialog box. Specify the details as described in "Connecting to the SAP System". Click Next.
On the Summary page, click Finish.
A new sap module is now available on the Projects Navigator.
Note: Before you create a SAP location, ensure that you have all the necessary information. You can provide the location information either while creating the module or before importing metadata into the module. You require the following information to create the location: server name, user name, password, system number, and client number. Obtain these details from the system administrator. |
When you set the connection information, you can choose the connection types described in the subsequent sections.
A remote function call enables you to call a function module on a remote system. This method requires specific IP Address information for the SAP application server.
SAP Remote Function Call (SAPRFC.INI)
You can also specify the connection information in a file called SAPRFC.INI
, and copy this file to the following location: OWB_HOME
\owb\bin\admin
.
Using the SAPRFC.INI
file requires prior knowledge of ABAP parameters, because you must specify the values for certain parameters to make the SAP connection, and is not the recommended connection method if you are not familiar with ABAP.
Note: TheSAPRFC.INI file comes with the SAP installation CD. |
The Create Module Wizard creates the module for you based on the metadata contained in the SAP application server.
Select one of the following connection types:
Remote Function Call (RFC)
This is the recommended connection type, and is selected by default in Oracle Warehouse Builder.
SAP Remote Function Call (SAPRFC.INI)
For more information about these connection types, see "Creating SAP Module Definitions".
Enter the connection information in the appropriate fields. The fields displayed on this page depend on the connection type you choose.
Note: Ensure that you have copied the DLL files to the right location. For more information, see "Required Files for SAP Connector". |
You must obtain the connection information for your SAP application server from the system administrator before you can complete this step.
RFC Connection type requires the following connection information:
Application Server: The alias name or the IP address of the SAP application server.
System Number: The SAP system number. This must be provided by the SAP system administrator.
Client: The SAP client number. This must be provided by the SAP system administrator.
User Name: The user name with access rights to the SAP system. This name is supplied by the SAP system administrator.
Language: EN for English or DE for German. If you select DE, the description text is displayed in German and all other text is displayed in English.
The SAPRFC connection type requires the following connection information:
RFC Destination: Enter the alias for the SAP connection information.
In addition, both the connection types require the following connection information if the ABAP report is to be executed in SAP using a function module and the data file is to be transferred by FTP to Oracle Warehouse Builder:
Host Login User Name: A valid user name on the system that hosts the SAP application server. This user must have access rights to copy the data file using FTP.
FTP Directory: The directory in the SAP server that stores the data file generated when the ABAP report is executed. For systems where the FTP directory structure is identical to the operating system directory structure, this field can be left blank. For systems where the file sys tem directory structure is mapped to the FTP directory structure, enter the FTP directory path that is mapped to the staging file directory in the file system directory structure. For example, on a computer that runs Windows, if the staging file directory "C:\temp"
is mapped to "/"
in the FTP directory structure, then enter "/"
in this field.
Execution Function Module: In the SAP instance, if a remote function module other than the SAP delivered function module RFC_ABAP_INSTALL_AND_RUN
is used to remotely execute ABAP reports through RFC connections, then enter the remote function module name here.
Click Test Connection to verify that the connection information you provided is correct.
Click OK to go back to the Connection Information page of the Create Module Wizard.
After you establish a connection with the SAP server, you can import metadata from SAP tables.
This section contains the following topics:
After creating the SAP source module, you can import metadata definitions from SAP tables using the Import Metadata Wizard. This wizard enables you to filter the SAP tables to import, verify those tables, and reimport them. You can import metadata for transparent tables, cluster tables, or pool tables.
To import SAP metadata:
From the Projects Navigator, expand the Applications node.
Right-click the SAP source module into which you want to import metadata and select Import.
Oracle Warehouse Builder displays the Welcome page for the Import Metadata Wizard.
Click Next.
Complete the following tasks:
You can filter objects to import by business domain or by text strings. Select a filtering method and click Next.
Select Business Domain and click Browse to display the SAP R/3 Business Domain Hierarchy dialog box.
The Import Metadata wizard displays the Loading Progress dialog box while it is retrieving the business domains.
The Business Domain Hierarchy dialog box lists the available SAP business domains.
Note: It may take a few minutes to list the SAP business domains depending on factors such as the network location of the SAP application server, the type of LAN used, and the size of the SAP application database. |
Use the Business Domain Hierarchy dialog box to select the SAP business domains that contain the metadata tables you want to import.
Select a folder and click Show Tables to view the tables available in a business domain.
The Import Metadata Wizard displays a list of tables in the selected business domain in the Folder dialog box.
Review this dialog box to ensure that you are selecting the required tables.
Some business domains can contain more than 1000 tables. Importing such a large amount of metadata can take time, depending on the network connection speed and the processing power of the source and target systems.
Click OK.
The wizard displays the Filter Information page with the SAP business domain displayed in the Business Domain field.
Select Text String, where object and use the Name matches or Description matches entry field to enter a string and obtain matching tables from the SAP data source.
The Description matches field is case sensitive, the Name matches field is not.
Create a filter for object selection by using the wildcard characters %
for zero or more matching characters, and _
for a single matching character.
For example, to search the business domain for tables whose descriptions contain the word CURRENCY, select Description matches and enter %CURRENCY%.
You can also search for tables by their names.
Specify the number of tables you want to import in the Maximum number of objects displayed field.
The Object Selection page contains a description of the tables and enables you to select the tables you want to import into the SAP module.
To select the tables:
Move the tables from the available list to the selected list.
The Import Metadata Wizard also enables you to choose whether you want to import tables with foreign key relationships for each table that you choose to import. You can select one of the following:
None: Import only the tables in the Selected list.
One Level: Import the tables in the Selected list and any tables linked to them directly through a foreign key relationship.
All Levels: Import the tables in the Selected list and all tables linked to them through foreign key relationships.
Click Next.
If you select One Level or All Levels, the Confirm Import Selection dialog box is displayed.
Review this dialog box to ensure that you are selecting the required tables.
Click OK.
The selected tables appear in the Selected list of the Table Selection page.
Click Next.
The wizard displays the Summary and Import page.
The wizard imports the definitions for the selected tables from the SAP application server, stores them in the SAP source module, and then displays the Summary and Import page.
You can edit the descriptions for each table by selecting the Description field and entering a new description.
Review the information about the Summary and Import page and click Finish.
The SAP Connector reads the table definitions from the SAP application server and creates the metadata objects in the workspace.
The time it takes to import the SAP metadata into the workspace depends on the size and number of tables and the connection between the SAP application server and the workspace. It is a best practice to import small batches of tables to allow better performance.
When the import completes, the Import Results dialog box displays. Click OK to finish importing metadata.
To reimport SAP tables, follow the importing procedure using the Import Metadata Wizard. Before starting the import, the wizard checks the source for tables with the same name as those you are importing. The tables that have been imported appear in bold in the Object Selection page. On the Summary and Import page, the Action column indicates that these tables are reimported. The wizard then activates the Advanced Synchronize Options button so that you can control the reimport options.
Note: To undo the reimport, click Undo. This ensures that no changes are made to the existing metadata. |
With SAP tables, you cannot view the data after you import the metadata from these tables. However, you can get good insight about the data that is stored in the tables by viewing the "Column Descriptions" and the "Constraints Details".
Column Descriptions
You can view the column description of each of the columns in a table. This is valuable because the column names in SAP can be nondescriptive, and difficult to interpret if you have not previously seen the data in the table.
To view the descriptions, double-click the table to open the data object editor for the table, and then click the Columns editor.
The description for the columns of the table are visible as shown in Figure 7-2.
Figure 7-2 The Columns Editor with the Description for the Columns of SAP Table
Constraints Details
The other benefit of the data object editor is that you can get information about the primary and foreign keys within the table. To view the key constraints, click the Constraints editor.
Note: It is also a useful practice to display the business names of the SAP tables in the Projects Navigator. Business names provide a description of the tables and are therefore more intuitive than the physical names. To view the business names for tables in Oracle Warehouse Builder, from the main menu, click Tools, Preferences, OWB, Naming, and then select Business Names in the Naming Mode field. |
After importing metadata from SAP tables, you must define the extraction mapping to extract data from the SAP system.
Note: For details of mappings in Oracle Warehouse Builder, see Oracle Warehouse Builder Data Modeling, ETL, and Data Quality Guide. |
You can use the Mapping Editor to create a mapping containing SAP tables. Creating a mapping with SAP tables is similar to creating mappings with other database objects. However, there are restrictions on the operators that can be used in the mapping. You can only use table, filter, joiner, and mapping input parameter mapping operators in a mapping containing SAP tables.
A typical SAP extraction mapping consists of one or more SAP source tables (transparent, cluster, or pooled), one or more filter or joiner operators, and a non-SAP target table (typically an Oracle table) to store the imported data.
This is as shown in Figure 7-3.
Note: The source table is always an SAP table. You cannot have both SAP and non-SAP (Oracle) source tables in a mapping, but the staging table is an Oracle table. |
In this mapping, the input parameter holds a date value, and the data from table BKPF
is filtered based on this date. Because this is defined as an input parameter, you can enter a value for the date when the mapping is run. The joiner operator enables you to join data from multiple tables, and the combined data set is stored in a staging table.
This section contains the following topics:
To add an SAP table to a mapping:
On the mapping editor, drag and drop the required SAP table onto the Mapping Editor canvas.
The editor places a table operator on the mapping canvas to represent the SAP table.
Use the operator properties panel of the Mapping Editor to set the SQL*Loader properties for the tables in the mapping.
To set the loading type for the SAP Source Table:
On the Mapping Editor, select the SAP source table. The Table Operator Properties panel displays the properties of the SAP table operator.
Select a loading type from the Loading Type list. With ABAP code as the language for the mapping, the SQL*Loader code is generated as indicated in Table 7-4.
Use the Configuration Properties dialog box to define the code generation language as described in "Setting the Language Parameter".
Set ABAP specific parameters, and the directory and initialization file settings in the Configuration Properties dialog box as described in "Setting Run-time Parameters".
Setting the Language Parameter
The language parameter enables you to choose the type of code you want to generate for a mapping. For mappings containing SAP source tables, Oracle Warehouse Builder enables you to select either PL/SQL or ABAP.
If the SAP system uses a non-Oracle database to store data, then you must select ABAP to generate code. If the SAP data is stored on an Oracle database, then you can specify PL/SQL. However, with PL/SQL, you cannot extract pool or cluster tables. Therefore, in all instances it is desirable to set the language to ABAP.
With the language set to ABAP, you can expand the Runtime Parameters node in the Configuration Properties dialog box to display settings specific to ABAP code generation.
Some of these settings come with preset properties that optimize code generation. It is recommended that these settings be retained, because altering them may slow down the code generation process.
The following run-time parameters are available for SAP mappings:
ABAP Report Name: Specifies the name of the ABAP report generated by the mapping. This is required only when you run a custom function module to execute the ABAP report.
Background Job: Select this option to run the ABAP report as a background job in the SAP system. Enable this option for the longer running jobs. Foreground batch jobs that run for a long duration are considered to be hanging in SAP after a certain time. Therefore it is ideal to have a background job running for such extracts.
Control File Name: By default, the control file name equals the data file name specified in the Data File Name field. This implies that the ABAP code generates a single control file that contains both, the SQL*Loader control information and the data (since the log files are the same). You can assign different file names for the control file and the data file, in which case different files are generated for the control information and data, and both the files are transferred by FTP.
Data File Name: Specifies the name of the data file that is generated when the ABAP report is executed in the SAP system.
File Delimiter for Staging File: Specifies the column separator in a SQL data file.
Include FTP: If this is set to true
, then the data file is moved to the Oracle Warehouse Builder system using FTP. If this is set to false
, then the file is not transferred.
INSTALL ONLY: When you set this to true
and run the mapping, the ABAP report gets installed on the SAP system, but does not get executed. To execute the ABAP report, you must run the mapping again and use the execution function module. Setting this option to true
enables you to generate the mapping, install the ABAP report on the SAP system, and subsequently make modifications to the ABAP report and then execute it. You can use this option when you want the ABAP report to be stored on the SAP system. If this option is set to false
, then the ABAP report is loaded and executed on the SAP system. However, the ABAP report is not stored on the SAP system after it is executed.
SAP Location: Specifies the location of the SAP instance from where the data can be extracted.
SAP System Version: Specifies the SAP system version number to which you want to deploy the ABAP report. The characteristics of the generated ABAP report depends on the version number. For MySAP ERP and all other versions, select SAP R/3 4.7. Different ABAP report is generated for versions before 4.7.
SQL Join Collapsing: If this is set to true
, then it specifies the following hint, if possible, to generate ABAP report.
SELECT < > INTO < > FROM (T1 as T1 inner join T2 as T2) ON <condition >
Staging File Directory: Specifies the location of the directory in the SAP system where the data file generated by ABAP report resides.
Timeout: This specifies the duration, in seconds, for which Oracle Warehouse Builder waits for the SAP system to execute the ABAP report and return a data file. If the SAP system completes the execution within this duration, then Oracle Warehouse Builder automatically retrieves the resultant data file from the SAP system. If the execution takes longer than the specified duration, then you must manually retrieve the data file.
You must set this parameter only if the mapping contains the joiner operator, and you want to explicitly specify the driving table. Unlike SQL, ABAP code generation is rule-based. Therefore, you must design the mapping in such a way that the tables are loaded in the right order. Or, you can explicitly specify the order in which the tables are to be joined. From the Configuration Properties dialog box, expand Table Operators, and then for each table, specify the Join Rank. The driving table must have the Join Rank value set to 1, with increasing values for the subsequent tables.
You can also let Oracle Warehouse Builder decide the driving table, and the order of joining the other tables. In such cases, do not enter values for Join Rank.
After designing the extraction mapping, you must validate, generate, and deploy the mapping, as you do with all mappings in Oracle Warehouse Builder.
To generate the script for the SAP mapping:
Right-click the SAP mapping and select Generate.
The Generation Results window is displayed.
On the Script tab, select the script name and select View Code.
The generated code is displayed in the code viewer.
You can edit, print, or save the file using the code editor. Close the code viewer to return to the Generation Results window.
To save the file, click Save as File and save the ABAP program to the hard drive.
After you generate the SAP mapping, you must deploy the mapping to create the logical objects in the target location.
To deploy an SAP mapping, right-click the mapping and select Deploy. You can also deploy the mapping from Control Center Manager.
For detailed information about deployment, see Oracle Warehouse Builder Data Modeling, ETL, and Data Quality Guide.
When an SAP mapping is deployed, an ABAP mapping is created and stored in the Oracle Warehouse Builder run time schema. Oracle Warehouse Builder also saves the ABAP
file under OWB_HOME
\owb\deployed_files
, where OWB_HOME
is the location of the Oracle home directory of your Oracle Warehouse Builder installation.
If you are using the Oracle Warehouse Builder installation that comes with Oracle Database, then this equals the database home.
Depending on whether data retrieval from the SAP system is fully automated, semi-automated, or manual, you must perform the subsequent tasks described in the following sections:
In a completely automated system, as an Oracle Warehouse Builder user you have access to the predefined function module in the SAP system. It enables you to execute any ABAP report and extract data directly from the SAP system without being dependent on the SAP administrator, as shown in Figure 7-4.
You can automate the process of transferring the ABAP report to the SAP system and generating the data file on the SAP system. After the data file is generated, Oracle Warehouse Builder uses FTP to transfer the data file to the Oracle Warehouse Builder system. The data file is then loaded into the target file by using SQL*Loader.
An automated system works as follows:
You design the extraction mapping and generate the ABAP report for this mapping.
Before deploying the mapping, you must ensure that the following configuration properties are set for the mapping:
ABAP Report Name: The file that stores the ABAP code generated for the mapping.
SAP Location: The location on the SAP system from where data is extracted.
Data File Name: The name of the data file to store the data generated by the execution of ABAP report.
Also ensure that you have provided the following additional connection details for the SAP location:
Execution Function Module: Provide the name of the predefined SAP function module. When executed, this function module takes the ABAP report name as the parameter, and executes the ABAP code.
FTP Directory: A directory on the SAP system. The data file generated upon the execution of the function module is saved to this directory. Oracle Warehouse Builder uses FTP to transfer the file from this directory to the Oracle Warehouse Builder system. This requires an FTP server to be located in the SAP system.
Also provide a user name with Write permissions on the FTP directory.
You then start the mapping, after which the following tasks are automatically performed:
Oracle Warehouse Builder deploys the ABAP report and the function module RFC_ABAP_INSTALL_AND_RUN is used to load and execute the ABAP report in the SAP system.
The ABAP report is sent to the SAP system using a "Remote Function Call (RFC)".
In the SAP system, the ABAP report extracts data from the source tables and creates a data file.
This data file is stored in the location specified by the Staging File Directory. See "Setting Run-time Parameters" for details of the staging file directory.
Oracle Warehouse Builder uses FTP to transfer this data file back to the Oracle Warehouse Builder system.
The file is stored in the location specified in the FTP Directory field.
Using SQL*Loader, Oracle Warehouse Builder loads the target table specified in the mapping with the data from the data file.
The advantage of this system is that you can create a fully automated end-to-end solution to extract SAP data. As a user, you create the extraction mapping, and run it from Oracle Warehouse Builder, which then creates the ABAP report, sends it to the SAP system, extracts the resultant data file, and loads the target table with the extracted data.
In a semi-automated system, as a Oracle Warehouse Builder user, you do not have access to the predefined function module RFC_ABAP_INSTALL_AND_RUN
, and therefore cannot use this function module to execute ABAP report. Instead, you must create an extraction mapping, deploy it, and then send the ABAP report to the SAP administrator who verifies the code before allowing you to run it in the SAP system, as shown in Figure 7-5.
A semi-automated system works as follows:
You design the extraction mapping and generate the ABAP report for this mapping.
You can then test this report in the development environment.
You then send the ABAP report to the SAP administrator, who tests the report, and loads it to the SAP repository in the production environment.
The SAP administrator can create a new report or use the same report that you send.
If the SAP administrator creates a new report, then obtain the name of the new report and use it in your mapping to extract data from the production environment.
Before you run the mapping in the production environment, ensure that you have set the following configuration properties for the mapping:
ABAP Report Name: The SAP administrator provides the name of the ABAP report after verifying the code. You must then use this report name to extract data.
SAP Location: The location on the SAP system from where data is extracted.
Data File Name: Name of the data file to store the data generated during execution of ABAP report.
Also ensure that you have provided the following additional connection details for the SAP location:
Execution Function Module: Provide the name of the custom function module created by the SAP administrator. On execution, this function module takes the ABAP report name as the parameter, and executes the ABAP code. You must obtain the function module name from the SAP administrator.
FTP Directory: A directory on the SAP system. The data file generated by the execution of the ABAP report is saved to this directory. Oracle Warehouse Builder imports the data file using FTP. The FTP server resides on the SAP system.
Also provide a user name with Read permissions on the FTP directory.
In the production environment, when you run the mapping, Oracle Warehouse Builder sends the ABAP report name and the custom function module to the SAP system using a "Remote Function Call (RFC)".
In the SAP system, the ABAP report gets executed and a data file is generated. The ABAP report gets executed only if the ABAP report name and the function module are available.
This data file is stored in the location specified by the Staging File Directory.
Oracle Warehouse Builder imports the data file using FTP. An FTP server must be available on the SAP server.
Oracle Warehouse Builder uses SQL*Loader to load the target table with data from the data file.
In a manual system, your role as an Oracle Warehouse Builder user is restricted to generating the ABAP report for the mapping, and sending the ABAP report to the SAP administrator. The tasks involved in this system are:
You create an extraction mapping, and generate the ABAP report for the mapping.
While designing the mapping, ensure that you specify the Data File Name to store the data file.
You send the ABAP report to the SAP administrator.
The SAP administrator executes the ABAP report in the SAP system.
On execution of the code, a data file is generated.
You can then create a process flow to import the data file. The process flow may typically consist of the activities shown in Figure 7-6. For more details on implementing process flows, see Oracle Warehouse Builder Data Modeling, ETL, and Data Quality Guide.
Figure 7-6 Process Flow to Import SAP Data
A File Exists activity checks for the availability of the data file.
If the file exists, then an FTP activity transfers the file to the Oracle Warehouse Builder system.
If the file does not exist, then it must wait till the file is made available, and then perform an FTP.
Using SQL*Loader, the target table is loaded with data from the data file.
In most production environments, the SAP administrator may not allow any other user to access the SAP system. In such cases, implementing the manual system may be the only viable option.
Using SQL*Loader in the Process Flow
To use SQL*Loader in the process flow, insert a SQL*Plus activity as shown in Figure 7-6. To use the SQL*Loader, use the HOST command. Once you insert the SQL*Plus activity, insert the following value for SCRIPT:
HOST sqlldr ${Target.User}/${Target.Password} CONTROL=${Working.RootPath}\C.CTL quit
Insert the relevant value for the control (.ctl
) file name.
Then configure the path settings for the SQL*Plus activity. Right-click the process flow and select Configure.
Under SQL*Plus Activities, expand the SQLPLUS node and provide the required values under Path Settings as shown in Figure 7-7.
Deployed Location refers to the location of the target table. Working location refers to the location of the control file.
You can use flat files as either source files or target files within mappings in Oracle Warehouse Builder.
This chapter describes the use of flat files as sources and targets in Oracle Warehouse Builder. It contains the following topics:
When using flat files as sources:
You can read from character data set files or binary flat files.
You can read from delimited files, fixed length files, or XML files.
You can use flat file operators in SQL*Loader mappings to read from flat files directly, or you can add an external table and access the flat file data in a mapping using SQL and PL/SQL.
You can also add flat file operators in code template based mappings and leverage code templates that are specifically constructed for files or the generic SQL code templates which leverages a built-in JDBC driver for files.
When using flat files as targets:
You can use only character data set files. Binary flat files are not supported as targets.
You can write to delimited files and fixed length files.
You can use flat file operators to write data to flat files.
Note: The same flat file can act as a source and a target file. |
File metadata describes the structure of data records in the file, including column names and data types. Before you use a flat file as source, it is desirable to define the metadata of that flat file.
You can import flat file metadata from several sources:
For character files with displayable data, you can use the Flat File Sample Wizard to view and analyze the flat file contents and deduce metadata from them.
For COBOL copybooks, you can import metadata definitions directly from the copybook file.
For binary files, files that are too complex for the Flat File Sample Wizard, and for target files for which no sample is available yet, you can explicitly define metadata for your flat file using the Create Flat File Wizard.
You can create flat file modules in your project that store metadata for source and target files. Each flat file module must be associated with a metadata and data location. When you specify a location for a module, both metadata location and data location point to the same location. You can specify different locations for the metadata and the data by editing the module.
The usual cycle, when working with a flat file as a source or target, is to:
Ensure that the location where the flat file stored is accessible from the host on which the mappings accessing the flat file is deployed.
Create a flat file module and associate it with the flat file module location. See "Creating Flat File Modules".
Define the flat file and specify its structure, based on whether its a character file, binary file, or a COBOL copybook. See "Using the Flat File Sample Wizard" for details of Flat File wizard. See "Using the Create Flat File Wizard" for details of creating a flat file for a binary file. See "Importing Metadata Definitions from COBOL Copybooks" for details of importing metadata from COBOL copybooks.
Select the type of mapping to use to extract data from the file. Consider whether you want to use flat file operators or external tables. See "Choosing Between External Table and Flat File Operators". If using a PL/SQL mapping, create external tables to represent the file contents as database tables.
Design your PL/SQL or SQL*Loader ETL mapping using the flat files as a source or target. See Oracle Warehouse Builder Data Modeling, ETL, and Data Quality Guide for details of creating mappings.
To use a flat file as a source, first define the metadata structure of the flat file and then import metadata into it.
You can import metadata from various types of files including character data set files and COBOL copybooks.
To define flat file metadata, complete the following steps:
Create a flat file module.
Create a module for each unique directory or path in your file system from which you want to import file metadata. See "Creating Flat File Modules".
Define the structure of the file.
The Flat File Sample Wizard enables you to view a sample of the flat file and to define record organization and file properties. The wizard enables you to sample and define common flat file formats such as string and ASCII. See "Using the Flat File Sample Wizard".
For files with complex record structures, the Flat File Sample Wizard may not be suitable for sampling the data. In such cases, you must create a flat file and define its structure accordingly. See "Using the Create Flat File Wizard" for creating and defining the structure of a flat file.
For COBOL copybooks, use the COBOL import dialog box to import metadata from copybooks. You can also set the import options depending on the copybook. See "Importing Metadata Definitions from COBOL Copybooks" for more details.
An external table is a read-only table that is associated with a single record type in a flat file. External tables represent data from a non-relational source in a relational table format. When you use an external table in a mapping, column properties are based on the SQL properties defined when importing the flat file. For more information about SQL properties for flat files, see "SQL Properties".
When you use an external table as a source table in a mapping, you can use it as a regular source table. Oracle Warehouse Builder generates PL/SQL code to select rows from the external table. You can also get parallel access to the file through the table. You also have access to additional relational function operators.
Note: You can use external tables only for source tables. |
You can either import an existing external table from another database as described in"Importing an External Table" or define a new external table as described in "Creating a New External Table Definition".
You can introduce source data from a flat file into a mapping either through an external table or a flat file operator. In general, external tables are the preferred method of loading large volumes of data from flat files.
Note the following details when comparing external tables and flat files:
External table operators and PL/SQL mappings provide for maximum performance, including exploitation of database parallelism during load. The full range of transformation operators is available, because the mappings are PL/SQL mappings. Over time, ETL mappings built with external tables takes advantage of further performance improvements at the database level.
Flat file operators and SQL*Loader mappings are a fully supported method of loading flat files. Oracle Warehouse Builder generates native SQL*Loader code for a SQL*Loader mapping. A more limited range of operators is supported in SQL*Loader mappings. You must stage data in an intermediate table and then use a PL/SQL mapping to transform it further before loading into a final target.
For more information about differences between external tables and SQL*Loader (flat file operators), see Oracle Database Utilities.
For more information about different types of mappings, see Oracle Warehouse Builder Data Modeling, ETL, and Data Quality Guide.
When you use a flat file as a target, it is desirable to define the metadata but is not necessary. For example, while using unbound flat file operators in mappings, the metadata for the flat file might not be defined before using it in the mapping. However, in practice, it might be more convenient to define the metadata definitions of a target file rather than to use an existing file as a target.
Creating a New Flat File as a Target
Create a flat file and define its structure before loading data into it.
To design a new flat file, complete the following steps:
Create a module for the flat file. See "Creating Flat File Modules".
Use the Create Flat File Wizard to design the metadata structure of the flat file. See "Using the Create Flat File Wizard".
Note: You can also create a target flat file in a mapping. Add an unbound flat file operator to a mapping, then map from the source table or operator to the flat file. Finally, do a Create and Bind for the flat file operator. For more information about mappings, see Oracle Warehouse Builder Data Modeling, ETL, and Data Quality Guide. |
Flat files are stored within modules that enable you to group multiple flat files.
To create a flat file module:
Right-click the Files node in the Projects Navigator and select New Flat File Module.
Oracle Warehouse Builder displays the Welcome page for the Create Module Wizard.
Define the module in the following steps:
The Finish page summarizes the information you provided on each of the wizard pages. When you click Finish, the wizard creates the flat file module and inserts it under Files in the Projects Navigator.
After creating a flat file module, you can either define a new flat file, as described in "Using the Create Flat File Wizard", import existing flat files into this module as described in "Using the Flat File Sample Wizard", or import a COBOL file as described in "Importing a Copybook".
Enter a name and an optional description for the flat file module on the Name and Description page.
Locations for flat file modules identify the paths in the file system from which you sample existing files or to which you create new files. You can define a new location or select an existing location on the Connection Information page.
Flat file modules have metadata and data locations. When you specify a location for a module, both metadata location and data location point to the same location. You can specify different locations for the metadata and the data by editing the module.
To import metadata from flat files located in different directories or paths in the system then for ease of use, create separate Oracle Warehouse Builder modules for each path. For example, suppose the files are located at the following paths, c:\folder1
and c:\folder1\subfolder
. You can create two file modules C_FOLDER1 and C_FOLDER1_SUBFOLDER and associate them with the corresponding paths. However, associating a module with a path does not restrict you from importing metadata definitions of files residing in a different path. You can define a path as the default, and later import files from a different path.
A data location identifies only a folder in the file system and does not include subfolders.
The Connection page is displayed with a default location name that is based on the module name that you entered in the Name and Description page. If you do not want to create a location, then select from the list of existing locations.
On the Connection Information page, click Edit to open the "Edit File System Location Dialog Box" and specify the location details. This location becomes the metadata and data location.
On the Edit File System Location dialog box, enter the fully qualified directory, including the drive letter.
Figure 3-1 shows the Edit Location dialog box.
Figure 3-1 Edit File System Location Dialog Box
Use the Create Flat File Wizard to design the structure of a new flat file in Oracle Warehouse Builder. This could be the case when you must define binary files and using the Flat File Sample wizard is not a viable solution. You can also use this wizard to create a flat file for use as a target in a mapping.
To use the Create Flat File wizard, right-click the flat file module and select New Flat File.
The Create Flat File Wizard guides you in completing the following steps:
Use the Name and Description page to provide a name for the flat file and to specify general properties associated with it.
Name: This name uniquely identifies the file within the module. Enter a name that does not include a space or any punctuation. You can include an underscore. You can use uppercase and lowercase letters. Do not start the name with a digit. Do not start a name with the reserved prefix OWB$
.
Default Physical File Name: A physical file name may be specified. This name can be altered at any time using configuration properties. If you are creating a new file, you can leave this name blank. If you are defining an existing binary file, enter the name of the file. Do not include the file path.
Character set: Select a character set or accept the default character set defined for the system on which Oracle Warehouse Builder resides. For complete information about NLS character sets, see Oracle Database Globalization Support Guide.
Description: You can enter an optional description for the file.
Use the File Properties page to specify Record Organization, Logical Record Definition, Number of Rows to Skip, and the Field Format for the flat file as shown in Figure 3-2.
Use the file properties page to specify Record Organization, Logical Record Definition, Number of Rows to Skip, and the Field Format for the flat file.
Indicate how to organize the records in the file. Select between the two options to indicate how the length of each record in the file is determined:
Records delimited by: Select this option to designate the end of each record by a delimiter. Then specify that record delimiter. You can accept the default record delimiter, new line (\n), or you can enter a new value. You can provide multiple characters and hexadecimal characters as a record delimiter. The hexadecimal character format is x'<hexadecimal string>'
or X'<hexadecimal string>'
. Using hexadecimal characters is useful if the delimiter character is not a new line character (\n) or carriage return<CR>. For example, to specify the pipe symbol (|) as the delimiter, use its hexadecimal value x'7C'
.
Record length (in characters): Select this option to create a file with all records having the same length. Then specify the number of characters in each record. For files with multibyte characters, count a multibyte character as one character.
By default, the wizard creates a file in which each physical record corresponds to one logical record. You can override the default to create a file composed of logical records that correspond to multiple physical records.
Number of physical records for each logical record: The data file contains a fixed number of physical records for each logical record.
PHYSICAL_RECORD1 PHYSICAL_RECORD2 PHYSICAL_RECORD3 PHYSICAL_RECORD4
In the preceding example, if the number of physical records for each logical record is 2, then PHYSICAL_RECORD1
and PHYSICAL_RECORD2
form one logical record and PHYSICAL_RECORD3
and PHYSICAL_RECORD4
form the second logical record.
End character of the current physical record: The data file contains a variable number of physical records with a continuation character at the end that signifies that the record is continued in the next physical record.
In the following example, the continuation character is a percentage sign (%) after the record.
PHYSICAL_RECORD1% PHYSICAL_RECORD2 end log rec 1 PHYSICAL_RECORD3% PHYSICAL_RECORD4 end log rec 2
Start character of the next physical record: The data file contains a variable number of physical records with a continuation character at the beginning of each physical record that signifies that the record continues from the previous physical record.
The following example shows two logical records with a continuation character at beginning of the record.
PHYSICAL_RECORD1 %PHYSICAL_RECORD2 end log rec 1 PHYSICAL_RECORD3 %PHYSICAL_RECORD4 end log rec 2
More than two records can be joined with this technique. The following example shows four physical records for each logical record using continuation at beginning.
PHYSICAL_RECORD1 %PHYSICAL_RECORD2 %PHYSICAL_RECORD25 %PHYSICAL_RECORD26 end log record 1 PHYSICAL_RECORD3 %PHYSICAL_RECORD4 %PHYSICAL_RECORD45 %PHYSICAL_RECORD46 end log record 2
When defining an existing file, indicate the number of records to skip at execution time in Skip rows. This is useful for skipping over header and field name records.
When creating a new target file, you can leave this value blank.
Select between Fixed Length and Delimited formats for the file.
To create a delimited file, specify the following properties:
Field delimiter: Field delimiters designate where one field ends and another begins. You can enter a field delimiter or select one from the list. The list displays common field delimiters. However, you may enter any character as a delimiter except the ones used for enclosures. The default is the comma (,). You can provide multiple characters and hexadecimal characters as a delimiter. The hexadecimal character format is x'<hexadecimal string>'
or X'<hexadecimal string>'
. For example, to specify the pipe symbol (|) as the delimiter, use its hexadecimal value x'7C'
.
Enclosures (Left and Right): Some delimited files contain enclosures that denote text strings within a field. If the file contains enclosures, enter an enclosure character in the text box or select one from the list. The list displays common enclosures. However, you may enter any character. The default for both the left and right enclosure is the double quotation mark ("). You can specify multiple characters and hexadecimal characters as field enclosures.
Indicate whether the file you create is to contain a single record type or multiple record types. The default is set to Single Record.
If the file contains multiple record types, select Multi Record. For each record type you want to create, specify values under Record Type Location and then its type value and record name.
Valid entries for Record Type Location depend on the field format you selected on the File Properties page, fixed length or delimited fields.
For example, if you specify the fields as delimited, then indicate the field position as shown in Figure 3-3.
For fixed-length files, the page displays two fields, Start Position and Length, under Record Type Location. Indicate the start position and the length of the field.
Use the Field Properties page to define properties for each field.
Since you can use a flat file in a mapping either directly as a source or a target, or indirectly through an external table, the Field Properties page shows both "SQL*Loader Properties" and "SQL Properties". Use the scroll bar to scroll to the right and view all the properties.
The first set of properties the wizard displays are for the SQL*Loader utility. When you use the flat file directly as a source in a mapping, SQL*Loader and the properties you set here are used. SQL*Loader properties include details of how the following are mapped to a relational table: "Type", "Length", "Precision", "Scale", "Mask", "NULLIF", and "DEFAULTIF". See Oracle Database Concepts for more details.
Type
Describes the data type of the field for SQL*Loader. You can use the wizard to import many data types such as CHAR
, DATE
, DECIMAL
EXTERNAL
, FLOAT EXTERNAL
, INTEGER EXTERNAL
, ZONED
, and ZONED EXTERNAL
. For complete information about SQL*Loader field and data types, see Oracle Database Utilities.
Length
For delimited files, specifies the maximum field length to be used by SQL* Loader.
Precision
Specifies the number of digits for certain data types such as Zoned and Float. See Oracle Database Utilities for more details.
Scale
Specifies the number of decimal digits for certain data types such as Zoned and Float. See Oracle Database Utilities for more details.
Mask
SQL*Loader uses DD-Mon-YY as its default date mask. You can override this default by entering a valid date mask when you describe the file. For example, if the input data has the format DD-Mon-YYYY rather than SQL*Loader default, you can enter the true format as a mask.
NULLIF
You can override the default action of SQL*Loader by placing a NULLIF condition on a field. For example, when a character field contains all blanks, you can direct SQL *Loader to mark the field as null rather than storing the blanks. Valid syntax for this field includes =BLANKS, ='quoted string', =X'ff' to indicate hexadecimal values, and != for 'not equal to' logic.
DEFAULTIF
You can override the default action of SQL*Loader by placing a DEFAULTIF condition on a field. For example, when a numeric or DATE field contains all blanks, SQL*Loader rejects the entire record. To override this action, type =BLANKS in the DEFAULTIF property. When SQL*Loader evaluates this condition, it sets the numeric field to zeros and loads the record. Valid syntax for this field includes =BLANKS, ='quoted string', =X'ff' to indicate hexadecimal values, and != for 'not equal to' logic.
These properties specify how the fields in a flat file translate to the columns in a relational table. They are used to define the characteristics of an external table. They are also used to automatically generate fields for mapping to relational operators. Similarly, if the flat file is used as a target, then these properties are used to generate the PL/SQL code.
The SQL properties you set here have the following implications for mapping design, validation, and generation:
External table: If you create an external table based on a single flat file record type, the columns properties are based on the SQL properties you defined for the flat file. For more information about external tables, see "Using External Tables".
Populating an Empty Mapping Object: In a mapping, if you populate an empty relational object with the metadata, then the object inherits the SQL properties you defined for the flat file source.
Flat file target: If you use the flat file as a target in a mapping, the target does not inherit the SQL properties. Instead, all fields inherit the default SQL*Loader data type.
SQL Type
Oracle Warehouse Builder supports many SQL data types such as CHAR
, DATE
, FLOAT
, and BLOB
.
The wizard assigns a default value for the SQL type based on SQL*Loader properties you set. If you accept the default SQL type, the type is updated if you later change SQL*Loader properties. However, if you override the SQL type by selecting a new SQL type from the list, it then becomes independent of the flat file SQL*Loader data type.
SQL Length
This property defines the length for the SQL column, if appropriate.
SQL Precision
This property defines the precision for the SQL column, if appropriate. For example, when defining NUMBER
and FLOAT
fields, the precision may be set.
SQL Scale
This property defines the scale for the SQL column, if appropriate. For example, when defining NUMBER
and FLOAT
fields, the scale may be set.
Select Automatically update start and end positions for all fields if you want all the field positions to be automatically recalculated based on changes made to any field.
Once you define the metadata of the new flat file, you can use it as a source or target file, or create an external table using a record from the file.
If you have existing flat files to use as sources, then you can import and sample the metadata from these flat files. Use the File Import dialog box to import metadata from flat files. This metadata must be imported into an existing file module.
To use the Flat File Sampling Wizard:
Establish connectivity to the files you want to import.
Because the Flat File Sample Wizard runs on the host running the Design Center client, ensure that the files to be sampled are accessible from that host. You can either mount a remote file system across your network using a method such as network file system (NFS) or Windows file sharing, or copy the files, or a representative section of the files, to a file system on or accessible from the Design Center client host.
Create a flat file module that contains the imported flat file definitions. See "Creating Flat File Modules" for details.
Either create a module for each folder in the file system from which you want to import files or use the same module to import file definitions from multiple folders.
When you create a flat file module, the location corresponding to this module is a path in the file system which acts as the metadata and data location. Use the Connection Information Page of the Create Module Wizard to specify this path.
A flat file location does not include subfolders of the specified folder.
Right-click the flat file module and select Import, Flat File. Alternatively, select the flat file module, and then from the main menu, select File, Import, Flat File.
The File Import dialog box is displayed.
Click Add Sample File, and select the files to import.
You can add single or multiple files into a module. All the files you add are listed under Sample File. If you specify a file in the Same As field, then the definition of the sampled file is based on the definition of the file specified in the Same As field.
Click Import. The Flat File Sample wizard is started. The files are sampled in the order they were listed under Sample File.
The Flat File Sample wizard enables you to view a sample of the flat file while you are defining it. Each step of the wizard enables you to design the definition and verify that the definition is correct. See "Using the Flat File Sample Wizard" for more information.
For binary files, you may prefer using the Create Flat File wizard. See "Using the Create Flat File Wizard".
The wizard creates definitions for the files, stores the definitions in the flat file module, and inserts the file names under the flat file module in the Projects Navigator.
Use the Flat File Sample Wizard as an aid in defining metadata for flat files.
This wizard samples delimited and fixed format files. It does not sample multibyte character file with a fixed record format. For these and other files containing non-displayable data, such as binary files, see "Using the Create Flat File Wizard".
After you complete the Flat File Sample Wizard, the metadata is defined in the workspace and you can use the flat files as source or target operators in a mapping. For more information about mappings, see the Oracle Warehouse Builder Data Modeling, ETL, and Data Quality Guide.
For simple flat files that are delimited and contain a single record type, the Flat File wizard guides you through the following tasks:
Use the Name page to describe the flat file you are sampling.
Name: This name uniquely identifies the file in the module. By default, the wizard creates a name based on the name of the source file by replacing invalid characters with an underscore. For example, if the file name is myfile.dat,
the wizard assign the workspace name myfile_dat.
If you rename the file, do not include a space or any punctuation in the name. You can include an underscore. You can use uppercase and lowercase letters. Do not start the name with a digit. Do not start a name with the reserved prefix OWB$
.
Description: You can enter an optional description for the file.
Character set: Character sets determine what languages can be represented in database objects and files. The default Globalization Support character set matches the character set defined for the computer hosting Oracle Warehouse Builder. If the character set differs from that of the source file, the data sample might appear unintelligible. You can display the data sample in the character set native to the source by selecting it from the list. For complete information about NLS character sets, see Oracle Database Globalization Support Guide.
Number of characters to sample: This value specifies the number of characters that is read and displayed. The number of characters that is read cannot be canceled, so ensure that you pick a reasonable number of characters. If you are sampling a multi-record file, then ensure that the sample is large enough to include at least one of each type. By default, the wizard samples the first 10000 characters. To determine an optimum value for this field, see "Example: Flat File with Multiple Record Types".
Advanced: Do not click the Advanced button for simple flat files. The advanced option is required only for complex flat files as described in "Flat File Wizard For Complex Flat Files".
Click Next to continue with "Specifying the Record Organization". At all steps, the wizard updates the sample displayed at the bottom of the wizard page. You can use the scroll bars to see the sample data.
Specify the following properties:
Records delimited by: Select this option if the end of each record is designated by a delimiter. Then specify that record delimiter. You can accept the default record delimiter, carriage return (<CR>), or you can enter a new value. For symbols other than \n and <CR>, specify the hexadecimal value of the character used as the delimiter.
Record length (in characters): Select this option if each record in the file is the same length. Then specify the number of characters in each record. For files with multibyte characters, count a multibyte character as one character.
Field delimiter: Field delimiters designate where one field ends and another begins. You can enter a field delimiter or select one from the list. The list displays common field delimiters. However, you may enter any character as a delimiter except the ones used for enclosures. The default is the comma (,). You can also specify multiple characters and hexadecimal characters as a field delimiter.
Enclosures (Left and Right): Some delimited files contain enclosures that denote text strings within a field. If the file contains enclosures, enter an enclosure character in the text box or select one from the list. The list displays common enclosures. However, you may enter any character. The default for both the left and right enclosure is the double quotation mark ("). Multiple characters and hexadecimal characters can be specified as field enclosures.
Use the Field Properties page in the Flat File Sample Wizard to define properties for each field. The wizard assigns a name to each field. It assigns 'C1'to the first field, 'C2' to the second, and so on. To rename fields, click a field and enter a new name.
For single record file types, you can instruct the wizard to use the first record to name the fields. Indicate this by selecting the Use the first record as the field names box.
The Field Properties page shows both "SQL*Loader Properties" and "SQL Properties". Use the scroll bar to scroll to the right and view all the properties.
The wizard deactivates properties that do not apply to a given data type. For example, you can edit the length for a CHAR
, but precision and scale are not available. Deactivated properties are grayed out.
The first set of properties the wizard displays are for the SQL*Loader utility. When you use the flat file directly as a source in a mapping, SQL*Loader and the properties you set here are used. SQL*Loader properties include details of how the following are mapped to a relational table: "Type", "Length", "Precision", "Scale", "Mask", "NULLIF", and "DEFAULTIF". See Oracle Database Concepts for more details.
The second set of properties are the SQL properties that include mapping details for "SQL Type", "SQL Length", "SQL Precision", and "SQL Scale". These properties specify how the fields in a flat file translate to the columns in a relational table. See "SQL Properties" for more details.
For complex files, the Flat File wizard guides you through the following tasks. The advanced mode enables you to define files with fixed length fields (in addition to delimited), files that contain multiple record types, or files that use logical records (multiple physical records per logical record).
Use the Name page to describe the flat file you are sampling.
Name: This name uniquely identifies the file in the workspace. By default, the wizard creates a name based on the name of the source file by replacing invalid characters with an underscore. For example, if the file name is myfile.dat,
the wizard assign the workspace name myfile_dat.
If you rename the file, do not include a space or any punctuation in the name. You can include an underscore. You can use uppercase and lowercase letters. Do not start the name with a digit. Do not start a name with the reserved prefix OWB$
.
Description: You can enter an optional description for the file.
Character set: Character sets determine what languages can be represented in database objects and files. The default Globalization Support character set matches the character set defined for the computer hosting Oracle Warehouse Builder. If the character set differs from that of the source file, the data sample might appear unintelligible. You can display the data sample in the character set native to the source by selecting it from the list. For complete information about NLS character sets, see Oracle Database Globalization Support Guide.
Number of characters to sample: You can indicate the number of characters for the wizard to sample from the data file. By default, the wizard samples the first 10000 characters. To determine an optimum value for this field, see "Example: Flat File with Multiple Record Types".
Click Advanced to continue with "Selecting the Record Organization". At all steps, the wizard updates the sample displayed at the bottom of the wizard page. You can use the scroll bars to see the sample data.
Use the Record Organization page to indicate how records are organized in the file you are sampling. Select between the two options to indicate how the length of each record in the file is determined:
Records delimited by: If the end of each record is designated by a delimiter, then specify that record delimiter. You can accept the default record delimiter, carriage return (<CR>), or enter a new value. You can specify multiple characters and hexadecimal characters as a record delimiter. If the delimiter is a symbol other than \n
or <CR>
, then specify the hexadecimal character of the symbol. The hexadecimal character format is x'<hexadecimal string>'
or X'<hexadecimal string>'
.
Record length (in characters): Select this option if each record in the file is the same length. Then specify the number of characters in each record. For files with multibyte characters, count a multibyte character as one character.
The Flat File Sample Wizard enables you to sample files composed of logical records that correspond to multiple physical records. If the file contains logical records, select File contains logical records. Then select one of the options to describe the file.
The wizard updates the display of the logical record in the lower panel to reflect your selection. The default selection is one physical record for each logical record.
Number of physical records for each logical record: The data file contains a fixed number of physical records for each logical record.
PHYSICAL_RECORD1 PHYSICAL_RECORD2 PHYSICAL_RECORD3 PHYSICAL_RECORD4
In the preceding example, if the number of physical records for each logical record is 2, then PHYSICAL_RECORD1
and PHYSICAL_RECORD2
form one logical record and PHYSICAL_RECORD3
and PHYSICAL_RECORD4
form a second logical record.
End character of the current physical record: The data file contains a variable number of physical records with a continuation character at the end that signifies that the record is continued in the next physical record.
In the following example, the continuation character is a percentage sign (%) after the record.
PHYSICAL_RECORD1% PHYSICAL_RECORD2 end log rec 1 PHYSICAL_RECORD3% PHYSICAL_RECORD4 end log rec 2
Start character of the next physical record: The data file contains a variable number of physical records with a continuation character at the beginning of each physical record that signifies that the record is a continuation of the previous physical record.
The following example shows two logical records with a continuation character at beginning of the record.
PHYSICAL_RECORD1 %PHYSICAL_RECORD2 end log rec1 PHYSICAL_RECORD3 %PHYSICAL_RECORD4 end log rec 2
More than two records can be joined with this technique. The following example shows four physical records for each logical record using continuation at beginning.
PHYSICAL_RECORD1 %PHYSICAL_RECORD2 %PHYSICAL_RECORD25 %PHYSICAL_RECORD26 (end log record 1) PHYSICAL_RECORD3 %PHYSICAL_RECORD4 %PHYSICAL_RECORD45 %PHYSICAL_RECORD46 (end log record 2)
After you complete the logical record information, click Next to continue with the wizard.
Use the File Format page to select between Fixed Length and Delimited formats for the fields in the file. The Flat File Sample Wizard does not sample multibyte character files with a fixed record format. For such files, use the Create Flat File wizard. For more details, see "Using the Create Flat File Wizard".
When you select a file format, the wizard updates the sample displayed at the bottom of the wizard page. You can use the scroll bars to navigate the sample data.
Fields in a file can either be of fixed length or delimited.
For fixed length fields, select Fixed Length. If you select this option then you must define the field lengths in the Field Lengths page. See "Specifying Field Lengths (Fixed-Length Files Only)".
When the fields are delimited, specify the following properties:
Field delimiter: Field delimiters designate where one field ends and another begins. You can enter a field delimiter or select one from the list. The list displays common field delimiters. However, you may enter any character as a delimiter except the ones used for enclosures. The default is the comma (,). You can also specify multiple characters and hexadecimal characters as a field delimiter. The hexadecimal character format is x'<hexadecimal string>'
or X'<hexadecimal string>'
.
Enclosures (Left and Right): Some delimited files contain enclosures that denote text strings within a field. If the file contains enclosures, enter an enclosure character in the text box or select one from the list. The list displays common enclosures. However, you may enter any character. The default for both the left and right enclosure is the double quotation mark ("). Multiple characters and hexadecimal characters can be specified as field enclosures.
Click Next to continue with the wizard.
Use the File Layout page to specify the number of rows to skip and to select between a single record type versus multiple record types.
Indicate the number of records to skip in Skip rows. This is useful for skipping over unwanted header information. If one of the records includes field names, skip the preceding header records so that the record containing field names is displayed as the first record in the file. Later in the wizard, on the Field Properties page, you can instruct the wizard to use that record for field names if you are defining a single record file type.
Indicate whether the file contains a single record type or multiple record types. Later in the wizard you can instruct the wizard to scan the file for the record types. For more information about multiple record types, see "Selecting Record Types (Multiple Record Type Files Only)".
Use the Record Types wizard page to scan the flat file for record types, add or delete record types, and assign type values to the record types.
Note: This step in not used for files with a single record type. If the data file has a single record type and fixed length file format, proceed to "Specifying Field Lengths (Fixed-Length Files Only)" . If the data file has a single record type and delimited file format, proceed to "Specifying Field Properties". |
In files with multiple record types, one of the fields distinguishes one record type from the next. When you use the Flat File Sample Wizard, you instruct the wizard to scan a specified field of every record for the record type values.
Figure 3-4 shows an example of a comma delimited file with two record types, "m
" and "f
". In this case, instruct the wizard to scan the third field. The wizard returns "m
" and "f
" as the type values.
When you use the wizard to sample flat files with multiple record types, ensure that the sample size you specified on the Name page is large enough to include each record type at least once. The default is 10000 characters.
If you do not see all of the required record types in the display area, you must specify a larger sample size on the Name page. Ensure that the sample size is large enough to include all record types. If all record types do not appear within a reasonable number of characters, you can mock up a sample file with rows selected from different parts of the master file to provide a representative set of data. If you know the record layout well, you can scan a representative sample and then manually add new record types.
When a delimited flat file contains several different types of records, you can use the scanning feature within the Flat File Sample Wizard to search and label record types.
To complete the Records Type page for a delimited file:
Select the one field that identifies the record types in the file.
The wizard displays all the fields in a sample in the lower panel of the page. In the Field position, you can enter the position as it appears in the sample. Unless you specify otherwise, the wizard defaults to the first field in the file.
If you click Scan, then the wizard scans the file for the field and displays the type values. The wizard assigns default record names (RECORD1, RECORD2...) to each type value.
You can edit the record names and the type value.
Click a record name to rename it or select a different record name from the list. You cannot associate a record name with multiple record type values.
Click Next to continue with the wizard.
When a fixed-length flat file contains several different types of records, you can use the scanning feature within the Flat File Sample Wizard to search for record types and assign a type value to each record type.
To complete the Records Type page for a fixed-length file:
Specify the one field that identifies the record types in the file. Use the ruler or enter values for the Start position and End position. To scan for records based on the first field, enter 0 for Start Position.
The wizard indicates the selected field with a red check mark in the ruler in the file sample in the lower panel of the page.
Click Scan.
The wizard scans the file field and displays the type values. The wizard assigns default record names (RECORD1, RECORD2...) to each type value.
You can edit the record names and type value.
Click a record name to rename it or select a different record name from the list. You cannot associate a record name with multiple record type values.
Click Next to continue with the wizard.
When you use the Flat File Sample Wizard to define a fixed-length flat file, you must define the length of each field in the file.
You can define field lengths by entering in the field lengths or by using the ruler.
If you know the length of each field, enter the field length in Field Lengths. Separate each length by commas. The wizard displays the changes to the sample at the bottom of the wizard page.
To use the ruler, click any number or hash mark on the ruler. The wizard displays a red check mark on top of the ruler and marks the boundary with a red line. If you make a mistake, double-click the marker to delete it or move the marker to another position. Use the ruler to create markers for each field in the file.
You can select the record type by name from Record Name. Or, you can select Next Record Type from the lower right corner of the wizard page. The number of records with unspecified field lengths is indicated on the lower left corner of the wizard page.
If the flat file contains multiple record types, the wizard prompts you to specify field lengths for each record type before continuing.
Use the Field Properties page in the Flat File Sample Wizard to define properties for each field. The wizard assigns a name to each field. It assigns 'C1'to the first field, 'C2' to the second, and so on. To rename fields, click a field and enter a new name.
For single record file types, you can instruct the wizard to use the first record in the file to name the fields. Indicate this by selecting the Use the first record as the field names box.
The Field Properties page shows both "SQL*Loader Properties" and "SQL Properties". Use the scroll bar to scroll to the right and view all the properties.
The wizard deactivates properties that do not apply to a given data type. For example, you can edit the length for a CHAR
, but precision and scale are not available. Deactivated properties are grayed out.
The first set of properties the wizard displays are for the SQL*Loader utility. When you use the flat file directly as a source in a mapping, SQL*Loader and the properties you set here are used. SQL*Loader properties include "Type", "Length", "Precision", "Scale", "Mask", "NULLIF", and "DEFAULTIF". See "SQL*Loader Properties" for more details.
The second set of properties are the SQL properties that include "SQL Type", "SQL Length", "SQL Precision", and "SQL Scale". These properties specify how the fields in a flat file translate to the columns in a relational table. See "SQL Properties" for more details.
COBOL programmers create files by defining the physical files and the logical records that is used to build those files. The records may be defined within the COBOL program itself, but are usually defined in separate files, called copybooks. These copybooks specify the layout and format of the user data, but do not specify the physical characteristics of the file itself. The physical characteristics of the file identify how the file is organized and accessed. For example, whether records are terminated with CR or CR/LF, is not part of the user data definition and is therefore not included in the record definition.
With Oracle Warehouse Builder, you can import metadata from COBOL copybooks. Oracle Warehouse Builder automatically manages the following operations:
Defining the fields for data storage
Calculating the data positions
Transforming COBOL data characteristics to the appropriate data type definitions in SQL*Loader
COBOL records are defined as a set of data elements and groups. A data element is an atomic data item. A group is a container for data elements. Each item defined in a COBOL record is called a field whether it is a group or an elementary item. Each field definition contains a level number which reflects the hierarchy of the data within the record. Groups can contain other groups or elementary items. Items contained in a group are called subordinate elements. Field definitions for elementary items contain complete metadata for the item primarily specified in picture and usage clauses. A group inherits characteristics from its subordinate elements and does not generally contain metadata specification details. An example of a simple copybook is given in Example 3-1.
Example 3-1 COBOL Copybook
01 EMPLOYEE-RECORD. 05 EMP-ID PIC 9(6). 05 EMP-REGION PIC 9. 05 EMP-DEPT PIC 999. 05 EMP-HIRE-DATE. 10 EMP-HIRE-DATE-MM PIC 99. 10 EMP-HIRE-DATE-DD PIC 99. 10 EMP-HIRE-DATE-YYYY PIC 9999. 05 EMP-SALARY PIC 9(9). 05 EMP-NAME PIC X(15).
The above example shows the definition of EMPLOYEE-RECORD. It contains 6 fields defined at the 05 Level. All of the fields except EMP-HIRE-DATE are elementary items. The elementary items contain picture clauses that define their data-characteristics. EMP-HIRE-DATE is a group field with subordinate elements at the 10 level. Each 10 level field is an elementary item that contains a picture clause defining its data characteristics. The date can be referenced as a whole by using the EMP-HIRE-DATE group field. This field includes the month, day, and year elements. Each subordinate field can also be referenced individually, allowing access to just the year for example.
The USAGE and PICTURE clauses are used to define the format and characteristics of data elements. If a USAGE clause is not specified, the data is in DISPLAY format, either external numeric or external character. When considered, the picture and usage identify the data type. Detailed information concerning COBOL data types and how they are mapped to relational data types is described inTable 3-1.
COBOL provides support for both arrays and varying arrays. These complex structures are identified by the use of an OCCURS clause. Varying arrays are defined with the additional specification of a DEPENDING ON clause. For arrays, the OCCURS clause indicates the number of elements in the array. For varying arrays, the occurs specification includes a range of elements from x
TO y
and the DEPENDING ON clause identifies a field that contains the actual number of elements in the array. An array or a varying array can be defined on an elementary field or a group. Example 3-2 provides an example of an array defined on elementary fields.
Example 3-2 Arrays Defined on Elementary Fields
01 EMPLOYEE-RECORD. 05 EMP-ID PIC 9(6). 05 EMP-REGION PIC 9. 05 EMP-DEPT PIC 999. 05 EMP-HIRE-DATE. 10 EMP-HIRE-DATE-MM PIC 99. 10 EMP-HIRE-DATE-DD PIC 99. 10 EMP-HIRE-DATE-YYYY PIC 9999. 05 EMP-SALARY PIC 9(9). 05 EMP-NAME PIC X(15). 05 EMP-SKILL-LEVEL PIC 99 OCCURS 4 TIMES. 05 EMP-SKILL-ID PIC 9(4) OCCURS 4 TIMES.
Two independent arrays are defined, one on EMP-SKILL_LEVEL and one on EMP-SKILL_ID. In this example, the record contains four occurrences of EMP-SKILL-LEVEL, followed by four occurrences of EMP-SKILL-ID. In the file, each record is constructed as: EMP_SKILL_LEVEL, EMP_SKILL_LEVEL, EMP_SKILL_LEVEL, EMP_SKILL_LEVEL, EMP_SKILL_ID, EMP_SKILL_ID, EMP_SKILL_ID, EMP_SKILL_ID.
Example 3-3 provides an example of a varying array defined on elementary fields.
Example 3-3 Varying Array Defined on Elementary Fields
01 EMPLOYEE-RECORD. 05 EMP-ID PIC 9(6). 05 EMP-REGION PIC 9. 05 EMP-DEPT PIC 999. 05 EMP-HIRE-DATE. 10 EMP-HIRE-DATE-MM PIC 99. 10 EMP-HIRE-DATE-DD PIC 99. 10 EMP-HIRE-DATE-YYYY PIC 9999. 05 EMP-SALARY PIC 9(9). 05 EMP-NAME PIC X(15). 05 EMP-SKILL-COUNT PIC 99. 05 EMP-SKILL-LEVEL PIC 99 OCCURS 1 TO 4 TIMES. DEPENDING ON EMP-SKILL-COUNT. 05 EMP-SKILL-ID PIC 9(4) OCCURS 1 TO 4 TIMES. DEPENDING ON EMP-SKILL-COUNT.
Two independent arrays are defined, one on EMP-SKILL_LEVEL and one on EMP-SKILL_ID. In this example, the value in EMP-SKILL-COUNT determines the number of occurrences in both arrays. In the file, a record with EMP_SKILL_COUNT equal to one is constructed as: EMP_SKILL_LEVEL, EMP_SKILL_ID. If the value of EMP-SKILL-COUNT is two, then two occurrences of EMP-SKILL-LEVEL are followed by two occurrences of EMP-SKILL-ID. In the file, a record with EMP_SKILL_COUNT equal to two is constructed as: EMP_SKILL_LEVEL, EMP_SKILL_LEVEL, EMP_SKILL_ID, EMP_SKILL_ID.
Example 3-4 provides an example of an array defined on a group field.
Example 3-4 Array Defined on a Group Field
01 EMPLOYEE-RECORD. 05 EMP-ID PIC 9(6). 05 EMP-REGION PIC 9. 05 EMP-DEPT PIC 999. 05 EMP-HIRE-DATE. 10 EMP-HIRE-DATE-MM PIC 99. 10 EMP-HIRE-DATE-DD PIC 99. 10 EMP-HIRE-DATE-YYYY PIC 9999. 05 EMP-SALARY PIC 9(9). 05 EMP-NAME PIC X(15). 05 EMP-SKILLS OCCURS 4 TIMES. 10 EMP-SKILL-LEVEL PIC 99. 10 EMP-SKILL-ID PIC 9(4).
In this example an array is defined with four elements. Each element contains one occurrence of each field: EMP_SKILL_LEVEL and EMP_SKILL_ID. In the file, each record is constructed as: EMP_SKILL_LEVEL, EMP_SKILL_ID, EMP_SKILL_LEVEL, EMP_SKILL_ID, EMP_SKILL_LEVEL, EMP_SKILL_ID, EMP_SKILL_LEVEL, EMP_SKILL_ID.
Example 3-5 provides an example of a varying array defined on a group field.
Example 3-5 Varying Array Defined on a Group Field
01 EMPLOYEE-RECORD. 05 EMP-ID PIC 9(6). 05 EMP-REGION PIC 9. 05 EMP-DEPT PIC 999. 05 EMP-HIRE-DATE. 10 EMP-HIRE-DATE-MM PIC 99. 10 EMP-HIRE-DATE-DD PIC 99. 10 EMP-HIRE-DATE-YYYY PIC 9999. 05 EMP-SALARY PIC 9(9). 05 EMP-NAME PIC X(15). 05 EMP-SKILL-COUNT PIC 99. 05 EMP-SKILLS OCCURS 4 TIMES DEPENDING ON EMP-SKILL-COUNT. 10 EMP-SKILL-LEVEL PIC 99. 10 EMP-SKILL-ID PIC 9(4).
In this example, one array is defined with up to four elements. The value in EMP-SKILL-COUNT defines the number of occurrences of the array. Therefore, if the value of EMP-SKILL-COUNT is set as one, then there is one occurrence of EMP_SKILLS. In the file, a record with EMP_SKILL_COUNT equal to one is constructed as: EMP_SKILL_LEVEL, EMP_SKILL_ID.
If the value of EMP-SKILL-COUNT is two, then there are two occurrences of EMP-SKILLS. In the file, a record with EMP_SKILL_COUNT equal to two is constructed as: EMP_SKILL_LEVEL, EMP_SKILL_ID, EMP_SKILL_LEVEL, EMP_SKILL_ID.
In COBOL, data in a record may have multiple definitions. You can use any one of these definitions to access the data. There are three methods for getting multiple definitions:
COBOL generated files can contain multiple record types. Whenever there is multiple level 01 item in a file definition, each level 01 provides a separate definition of the data record area. Only one record is kept in the data record area at a time, so only one level 01 definition is used at a time. For example, a file may contain two types of records, department records and employee records. Level 01 items are defined for both department and employee records. The hierarchy for each record immediately follows the level 01 item for that record and provides the definitions for the entire record. Each record contains a field that identifies the record type. This record type is at the same position for all record definitions.
In the following example, the record type is in the first position:
As seen in the section on Data Hierarchy, fields can be organized in groups. These groups actually provide an additional definition of the fields and are used to access the data.
COBOL provides the ability to redefine a field or a group. Redefinition does not define data at a new location, but instead provides an additional definition of data characters that have been previously defined.
Example 3-7 Redefining a Field
01 EMPLOYEE-RECORD. 05 EMP-ID PIC 9(6). 05 EMP-ID-R REDEFINES EMP-ID. 10 EMP-ID-GROUP PIC 99. 10 EMP-ID-NUM PIC 9999. 05 EMP-REGION PIC 9. 05 EMP-DEPT PIC 999.
In the above example, the EMP-ID field is defined as a 6 digit numeric field. A redefinition is provided dividing the field into two fields: EMP-ID-GROUP is defined as the first two digits of the EMP-ID field. EMP-ID-NUM is defined as the last four digits of the EMP-ID field. EMP-ID-NUM and EMP-ID-GROUP both begin at position 1 in the record.
Example 3-8 Redefining a Group
01 EMPLOYEE-RECORD. 05 EMP-ID PIC 9(6). 05 EMP-ID-R REDEFINES EMP-ID. 10 EMP-ID-GROUP PIC 99. 10 EMP-ID-NUM PIC 9999. 05 EMP-REGION PIC 9. 05 EMP-DEPT PIC 999. 05 EMP-HIRE-DATE. 10 EMP-HIRE-DATE-MM PIC 99. 10 EMP-HIRE-DATE-DD PIC 99. 10 EMP-HIRE-DATE-YYYY PIC 9999. 05 EMP-SALARY PIC 9(9). 05 EMP-NAME PIC X(15). 05 EMP-SKILLS OCCURS 4 TIMES. 10 EMP-SKILL-LEVEL PIC 99. 10 EMP-SKILL-ID PIC 9(4). 05 EMP-SKILLS-R REDEFINES EMP-SKILLS. 10 EMP-SKILL-LEVEL1 PIC 99. 10 EMP-SKILL-ID1 PIC 9(4). 10 EMP-SKILL-LEVEL2 PIC 99. 10 EMP-SKILL-ID2 PIC 9(4). 10 EMP-SKILL-LEVEL3 PIC 99. 10 EMP-SKILL-ID3 PIC 9(4).
In the above example, the EMP-SKILL array has been redefined so that each element is expanded providing a field for each element. As in the previous example, the definitions for EMP-SKILLS-R is defining the same data area as EMP-SKILLS. The first occurrence of EMP-SKILL-LEVEL is at the same position in the record as EMP-SKILL-LEVEL1.
COBOL programs can create files of different organization. These include the following:
Line Sequential: Line sequential files are generally known as text files because the primary use of this file type is for display data. The records in these files can only be accessed in the order they were written. Line sequential files contain variable length records. A record delimiter separates each record in the file. The record delimiter that is used is operating system dependent and is inserted after the last character in each record.
Record Sequential: Record sequential files are also accessed in the order they were written. This file organization is more flexible than line sequential. Records can be of fixed or variable length. The record sequential organization is used for sequential files that contain binary or packed data, or any data that may have other non-printable characters. In fixed length files, every record that is written to the file is the same length. If necessary, the record is padded with blanks to ensure uniform length. With variable length records, each record is written based on the actual size of the record. A Record Descriptor Word (RDW) is inserted at the beginning of each record. The RDW contains the actual length of the record. It is not considered part of the record and is not included in the data definition. In general, variable length records are used when there are many small records and few large records. Variable length records must be converted before they can be imported.
Relative Files: Relative files can be accessed randomly in the order they are written. Records can be declared as variable, but they are written as fixed. The random access is not by key, but is instead by relative record number. Relative files must be converted to sequential before they can be imported.
Indexed Files: Indexed files can be accessed by key field(s) in the order they are written. Records in indexed files can be fixed or variable. Indexed files consist of two physical files, one containing the data and the other containing the index. Indexed files are converted to sequential before they are imported.
The file format used for data storage is determined by the COBOL application. This information is not defined in the copybook.
As you consider importing COBOL files into a relational database, you must plan how the data should be mapped into the relational database.
Records
At the highest level, each record type, level 01 structure, is considered mapping to a table. Records in files are often designed to be independent sources of information. This is a large difference between files and tables. Tables are generally designed to hold information that is closely related. When you consider the records in your file, you should consider if it would be better to define multiple tables for the information. Groups that are used to organize related information are often good candidates for independent tables. For example, you may have a group that is defined for address information, which might naturally fit into a name and address table. Similarly, arrays, whether varying or not, are also often good candidates for independent tables.
Arrays
In order to define arrays, Oracle Warehouse Builder normalizes the array by specifying each element in the array independently. This technique is also used for defining varying arrays. Not all varying arrays can be loaded using SQL*Loader. When the varying array is after the record, SQL*Loader may be able to load it. Records with embedded varying arrays are not necessarily physically stored as variable, therefore you may be able to use this technique for loading these records also. See "Example: Extracting Data from a Single Record Type Varying Array COBOL File".
Mapping COBOL Data Types to SQL Data Types
The USAGE
and PICTURE
clauses are used to define the format and characteristics of data elements. Together the picture and usage identify the scalar data type, length, precision and scale. Table 3-1 shows data element definitions that apply to COBOL files. It describes the representation of each data type and identifies how that data type is mapped to SQL*Loader data type definitions. The PICTURE represents a mask that describes the data. The values identified within the parentheses are multiplication factors for the preceding picture element. So when n = 5, X(n) indicates that there are 5 characters of type X (alphanumeric data).
Table 3-1 COBOL Data Types and the Equivalent SQL *Loader Data Types
COBOL Data Type | SQL Loader Data Type | Description |
---|---|---|
X(n) |
|
Alphanumeric data. Each X identifies one allowable character from the specified character set. |
A(n) |
CHAR(n) |
Alphabetic data. Each A identifies any letter of the alphabet or space. |
9(n) |
|
Numeric data. Each 9 identifies one digit. |
+- mantissa +- exponent |
FLOAT EXTERNAL (length) |
External floating point data. |
S9(n)v9(m) SIGN TRAILING |
ZONED(precision, scale) where precision = n+m and scale = m |
Numeric data. Each 9 identifies one digit. The v indicates the implied decimal position. The sign is carried in the last byte. |
9(n)v9(m) |
ZONED(precision, scale) where precision = n+m and scale = m |
Numeric data. Each 9 identifies one digit. The v indicates the implied decimal position. |
9(n)v9(m) S9(n)v9(m) |
SMALLINT INTEGER(length 2,4,or 8) May use SIGNED| UNSIGNED May require BYTEORDER clause Scale handled with an expression |
Internal format data with a radix of 2. The size of the field varies with the value m. n+m = 1-4, length = 2 n+m = 5-9, length = 4 n+m = 10-18, length =8 |
Not allowed |
FLOAT May require BYTEORDER clause. |
Single-precision floating point number, 4 bytes long |
Not allowed |
DOUBLE May require BYTEORDER clause. |
Double-precision floating point number, 8 bytes long |
9(n)v9(m) S9(n)v9(m) |
DECIMAL (precision, scale) where precision = n+m and scale = m |
Internal format numeric data with a radix of 10. The clause indicates that each digit must use the minimum storage possible. Generally, each byte contains two digits with the last half-byte containing the sign. |
X(n) 9(n)v9(m) S9(n)v9(m) |
Not commonly used |
The internal format of the data is not defined. It is often stored the same as BINARY, however the radix may be reversed. |
G(n) |
GRAPHIC(n) |
Graphic data that does not contain Shift In and Shift Out characters |
05 V 49 V-LN PIC S9(4) COMP 05 V-DATA PIC X(n) |
VARCHAR(max length), can only be loaded correctly between systems where SMALLINT is the same size |
Variable length character field |
05 V 49 V-LN PIC S9(4) COMP 05 V-DATA PIC G(n) |
VARGRAPHIC(max length), can only be loaded correctly between systems where SMALLINT is the same size. |
Variable length Graphic data that does not contain Shift In and Shift Out characters |
To import metadata from COBOL, you must create a flat file module and then import the metadata definitions from a Cobol copybook.
Importing a Copybook
To import metadata from a COBOL copybook:
Create a flat file module as described in "Creating Flat File Modules". Provide the location details of the COBOL copybook.
Right-click the newly created module and select Import, Cobol.
The Cobol Import dialog box is displayed.
An alternative way to open the Cobol Import dialog box is to select the newly created module and then select File, Import, Cobol.
Click Add Copybook to browse for the copybook you must import.
You can add multiple copybooks simultaneously. When you add a copybook, the Copybook field of the Import Copybooks spread table displays the directory path of the copybook. Use the File field to edit the name of the imported copybook. Use the Description field to add an optional description for the imported copybook.
Click View Copybook to view the metadata structure of the copybook being imported.
Click Session Options to open the Import Cobol Session Options dialog box. For details of values to be specified in this dialog box, see "Import Cobol Session Options".
Click OK and on the Cobol Import window, click Import.
You can use this dialog box to specify a template file and other properties. Based on the copybook you are importing, determine if the default physical file properties are acceptable. Or else, select a template file from which the physical characteristics are imported. You can edit some physical properties of the file after the import as well.
To specify a template file, select a file from the Copy Flat File Properties From list.
If you retain the Default Properties opt ion from the Copy Flat File Properties From list, the file is defined as fixed format (not delimited) with the following properties:
Skip 0 records
Use first row as column name set to false
Record delimiter set to \n
One physical record for each logical record
If you import a multi-record copybook, then it is set to multi record.
If you select a file from the Copy Flat File Properties From list, then the physical characteristics of this file are used for the newly imported copybook.
Do Not Import Groups: To suppress the definition of group items. This ensures that only the subordinate items get imported. For example, if you have the following fields:
05 EMP-HIRE-DATE. 10 EMP-HIRE-MONTH PIC 99. 10 EMP-HIRE-DAY PIC 99. 10 EMP-HIRE-YEAR PIC 9999.
When you select the Do Not Import Groups option, only three fields are created, EMP-HIRE-MONTH, EMP-HIRE-DAY, and EMP-HIRE-YEAR. When the option is not selected, then four fields, EMP-HIRE-DATE, EMP-HIRE-MONTH, EMP-HIRE-DAY, EMP-HIRE-YEAR are created at the time of import.
Do Not Import Redefines: To avoid import of redundant redefined fields. For example, if you have the following copybook definition:
05 HIRE_DATE. 10 HIRE_MONTH PIC 99. 10 HIRE_DAY PIC 99. 10 HIRE_YEAR PIC 9999. 05 HIRE_DATE_ALPHA REDEFINES HIRE_DATE. 10 HIRE_MONTH PIC XX. 10 HIRE_DAY PIC XX. 10 HIRE_YEAR PIC XXXX.
To import all the fields, clear the Do Not Import Redefinitions option. When the option is selected, only the first four fields, HIRE_DATE, HIRE_MONTH, HIRE_DAY, HIRE_YEAR are imported.
At the time of importing the metadata, it is recommended that you inspect the copybook for unnecessary metadata including grouped fields and redefined fields. You can also edit the file later to remove unnecessary definitions.
To extract data from a COBOL data file, you must first import the corresponding copybook. Consider the following copybook for import:
01 EMPLOYEE-RECORD. 05 EMP-RECORD-LENGTH PIC 9(4). 05 EMP-ID PIC 9(6). 05 EMP-REGION PIC 9. 05 EMP-DEPT PIC 999. 05 EMP-HIRE-DATE. 10 EMP-HIRE-MM PIC 99. 10 EMP-HIRE-DD PIC 99. 10 EMP-HIRE-YEAR PIC 9999. 05 EMP-SALARY PIC 9(9). 05 EMP-NAME PIC X(15). 05 EMP-SKILLS OCCURS 4 TIMES. 10 EMP-SKILL-LEVEL PIC 99. 10 EMP-SKILL-ID PIC 9999.
Import the copybook as described in "Importing a Copybook".
To set the file properties of the imported copybook, right-click the file on the Projects Navigator and click Open. On the Edit Flat File dialog box, define the file properties as given in "Defining the File Properties".
Use the Name, General, and Structure tabs to specify the file properties.
Use the Name tab to specify the character set. This is an EBCDIC file, so the character must be set to WE8EBCDIC500
.
Use the General tab to set the following file properties.
Record Delimiter: The record delimiter for this file must be set to the binary value X'0D0A'
.
Logical Record Definition: In this example, there is one logical record per physical record.
Field Format: Each field in this record is at a constant position. Therefore, the Fixed Length Fields option is selected by default.
Record Type: This copybook contains a single type of record. Therefore, the Single Record option is selected by default.
The field properties are as shown in Figure 3-5.
Figure 3-5 The Field Properties of the Imported Cobol File
Use the Structure tab to review the field properties and make changes if required.
The structure of the imported file is as shown in Figure 3-6.
Figure 3-6 Structure of the Imported Cobol File
Create a mapping with the imported COBOL file as the source. Insert an unbound table operator in the mapping and map the desired fields from the COBOL file to the table operator.
Figure 3-7 Mapping a Flat File to a Table
Right-click the mapping and click Configure to open the Configuration Properties dialog box. Select SQL*LOADER as the language for code generation. Tune any of the other SQL*Loader settings.
Figure 3-8 Configuration Properties Dialog Box
Click Sql Loader Data Files and then click the ellipsis as shown in Figure 3-9 to open the SQL Loader Data Files dialog box.
Figure 3-9 Configuration Properties for the Mapping
On the SQL Loader Data Files dialog box, right-click SQL Loader Data Files and select Create. A new data file node is added under Sql Loader Data Files.
Provide the data file name and select the data file location from where data is to be loaded. Specify a bad file to store those records that are not loaded into the target table due to error in the data. Specify a discard file to store those records that are not loaded due to SQL*Loader loading checks.
Figure 3-10 SQL Loader Data Files Dialog Box
After you have defined the configuration properties for the mapping, you can deploy the table and the mapping and then start the mapping to load the COBOL data into the target table.
To deploy the mapping, right-click the mapping and select Deploy. After deploying the mapping, start the mapping. Right-click the mapping and select Start. When you run the mapping, the data is read from the data file you provided while configuring the mapping, and loaded into the target table.
To view the data in the target table, right-click the table, and select Data. Figure 3-11 shows the data in the table.
You can view and edit the definition of a file by using the Edit Flat File dialog box.
To update a file definition:
Select the file definition in the Projects Navigator.
Right-click the file and select Open.
Oracle Warehouse Builder displays the Edit Flat File dialog box with the following tabs:
Name Tab: Use this tab to edit the name and descriptive for the file.
General Tab: Use this tab to change the general file properties, such as the physical record size, the number of physical records for each logical record, and the delimiter and enclosure characters.
Record Tab: This tab is available only for flat files with multiple record types. Use this tab to change the record type position or add, delete, or edit record types.
Structure Tab: Use this tab to edit field level attributes, SQL Loader and SQL Properties.
Use this tab to edit the name, default physical file name, description, and character set for the file. See "Describing a Flat File" for more details.
Use this tab to change the general properties, such as the physical record size, the number of physical records for each logical record, the delimiter and enclosure characters, the number of rows to skip, and the field format. See "Defining File Properties for a Flat File" for more details about the general properties.
If the file contains multiple record types, then specify the field position that determines the record type in Record Type Location.
Field Position: This field displays the column that contains the record type indicator. You can change this value. For example, if you have a flat file with two record types that are distinguished from each other by the content of the third column as shown in the following list, then the value in this field is 3.
Record Type 1: 2002 0115
E
4564564
Record Type 2: 2003 1231
D
659871 Q HKLIH
Record type values: This table displays each record type, the value that distinguishes it from the other record types, and the name you have given to the record type. Table 3-2 shows an example of what the record type values for the two sample records earlier might be:
To add new record types, click New and enter a Type Value and a Record Name describing the record type.
To delete record types, select the field to the left of each record type you want to remove and click Delete.
For fixed length files containing multiple record types, Record Type Location consists of two fields to determine the record type indicator:
Start Position: The starting position of the field that specifies the record type.
Length: The length of the field.
Use the Structure tab to edit a field name, data type, mask, "SQL*Loader Properties" and "SQL Properties". You can add or delete a field. You can also add a field mask, NULLIF condition, or DEFAULTIF condition.
If the file contains multiple record types, you can select each record type from the Record Name field. Oracle Warehouse Builder displays the field properties for the selected record. See "Defining Field Properties for a Flat File" for more details.
External tables are database objects available in Oracle Database9i, and higher.
External tables are tables that represent data from flat files in a relational format. They are read-only tables that act like regular source tables. When you create and define an external table, the metadata for the external table is saved in the workspace. You can load data from flat files to external tables, transform the data using mappings, and load the transformed data to target tables.
The following sections provide information about external tables:
Before you begin
Each external table you create corresponds to a single record type in an existing flat file. Before you begin, first define the file within the workspace as described in "Defining Character Data Files".
To create a new external table definition:
From the Projects Navigator, expand the Databases node and then the Oracle node.
Expand the module where you want to create the external table.
Right-click External Tables and select New External Table.
Oracle Warehouse Builder displays the Welcome page of the Create External Table Wizard. Use the wizard to complete the following pages:
Use the Name page to define a name and an optional description for the external table. Enter the name in the Name field. In the physical naming mode, you must enter a name between 1 and 200 valid characters. Spaces are not allowed in physical mode. In the logical mode, you can enter a unique name up to 4000 characters in length. The external table name must be unique within the module. Spaces are allowed in the logical naming mode.
Use the Description field to enter an optional description for the external table.
The wizard displays the File Selection page. The wizard lists all the flat files available in the workspace. Select a file on which to base the external table. To search through long lists of files, type the first few letters of the file name and click Go.
If you select a file that contains multiple record types, you must also select the record type name at the bottom of the File Selection page. An external table can represent only one record type.
You have the option of not specifying the file at this stage. If you do not specify a file in the wizard, you can later specify information such as record type, access parameters, and data files on the external table properties sheet.
You can select a location from the list of flat file locations. Alternatively, you can leave the location unspecified. If you do not specify a location in the wizard, you can later specify a location on the external table properties sheet.
Note: The location associated with an external table must be deployed before the external table itself can be deployed. |
You can create an external table from a flat file, or import an existing external table into Oracle Warehouse Builder.
To import an external table:
On the Projects Navigator, right-click External Tables, and select Import.
Specify to import a database object or an Oracle Warehouse Builder metadata file.
Use the External Table editor to edit an external table definition. To open the editor, right-click the name of the external table from the Projects Navigator and select Open Editor. The Edit External Table dialog box is displayed. The tabs and properties that you can edit depend on how you defined the external table in the workspace.
The External Table Properties window displays with the following tabs:
Use the Name tab to rename the external table. The same rules for renaming tables apply to external tables. For more information, see Oracle Warehouse Builder Data Modeling, ETL, and Data Quality Guide.
Use the Columns tab to add or edit columns. The same rules for adding columns to tables apply to external tables. For more information, see Oracle Warehouse Builder Data Modeling, ETL, and Data Quality Guide.
Use the File tab to view the name of the flat file that provides the metadata for the external table. If the source flat file has multiple record types, the File tab also displays the record name associated with the external table. You can update this relationship or change it to a different file and record by reconciling the external table. For more information, see "Synchronizing an External Table Definition with a Record in a File".
The File tab displays under the following conditions:
You used the New External Table Wizard to create the external table and you specified a file name.
You did not specify a file name in the New External Table Wizard, but you reconciled the external table definition with a file and record.
Use the Location tab to view or change the flat file location. The Location list displays the available locations. Select a location from this list.
Use the Data Rules tab to define data rules for the external table. For more information about using data rules, see Oracle Warehouse Builder Data Modeling, ETL, and Data Quality Guide.
Access parameters define how to read from the flat file when a file has not been specified for the external table. In some cases, the External Table editor displays the Access Parameters tab instead of the File tab.
The tab for the access parameters displays under the following conditions:
You imported an external table from another workspace. In this case, you can view and edit the access parameters.
You created an external table in an Oracle Database and imported its definition. In this case, you can view and edit the access parameters.
You use the Create External Table Wizard to create an external table and do not specify a reference file. The access parameters are empty. Before generating the external table, you must reconcile the external table definition with a flat file record or manually enter your own access specifications.
The access parameters describe how fields in the source data file are represented in the external table as columns. For example, if the data file contained a field emp_id
with a data type of INTEGER(2), the access parameters could indicate that the field be converted to a character string column in the external table.
Although you can make changes to the access parameters that affect how the external table is generated and deployed, it is not recommended. Oracle Warehouse Builder does not validate the changes. For more information about external tables and the access parameters, see Oracle Database Utilities.
Note: When an external table is imported into Oracle Warehouse Builder, the access parameter definition of the table is truncated to 4000 characters. This can potentially cause DDL generation errors. |
Oracle Warehouse Builder enables you to update the external table definition with the metadata changes made to the file associated with the external table. You do this by synchronizing the external table with the source file.
To synchronize an external table definition with a record in a file:
In the Projects Navigator, right-click the external table to synchronize and select Synchronize.
Oracle Warehouse Builder displays the Synchronize dialog box.
Use the Select the Object to synchronize list to specify the flat file with which the external table is to be synchronized.
By default, the flat file that was used to create the external table is displayed in this list. Expand the list to see a list of flat file modules and the flat files they contain.
Use the Matching Strategy list to specify how the search is performed for matches and the external table with the information from the flat file is updated. The options for match strategy are:
Match By Object ID: This strategy compares the field IDs of that the external table columns references with the field IDs in the flat file.
Match By Object Name: This strategy compares the physical names in the external table with the physical names in the flat file.
Match By Object Position: This strategy matches by position, regardless of physical names and IDs. The first external table attribute is reconciled with the first record in the file, the second with the second, and so on. Use this strategy when you want to reconcile the external table with a new record.
Use the Synchronize Strategy list to indicate how differences in metadata between the existing external table definition and the record you specified are handled:
Merge: The metadata from the existing external table definition and the record you specified is combined.
Replace: Existing record metadata is deleted from the external table definition and the new file record metadata is added to the external table.
Click View Synchronization Plan to open the Synchronization Plan dialog box.
You can view the actions performed during synchronization.
Select a new strategy and then click Refresh Plan.
On the spread table, expand the Source node to view the action performed on each column.
Click OK to complete synchronizing the external table definition.
Configure the following properties for an external table:
Note: When you import an external table into the workspace and when you manually define access parameters for an external table, some external table configuration properties are overruled by settings on the Access Parameters tab in the External Table Properties window. |
To configure the physical properties for an external table:
Select an external table from the Projects Navigator.
From the Edit menu, select Configure. You can also click the Configure icon from the toolbar.
The Configuration Property window is displayed.
To configure a property, click the white space and make a selection from the list.
Under Access Specification, you can indicate the following file names and locations that Oracle Warehouse Builder uses to load the external table through SQL*Loader.
Bad File: If you specify a name and location for a bad file, Oracle Database is directed to write to that file all records that were not loaded due to errors. For example, records written to the bad file include those not loaded due to a data type error in converting a field into a column in the external table. If you specify a bad file that exists, the existing file is overwrittgen.
Discard File: If you specify a name and location for a discard file, Oracle Database is directed to write to that file all records that were not loaded based on a SQL*Loader load condition placed on the file. If you specify a discard file that exists, the existing file is overwritten.
Log File: If you specify a name and location for a log file, then Oracle Database is directed to log messages related to the external table to that file. If you specify a log file that exists, new messages are appended.
For each of these files, you can either specify a file name and location, select Do not use, or select Use default location.
Under Reject, you can indicate how many rejected rows to allow. By default, the number of rejected rows allowed is unlimited. If you set Rejects are unlimited to false, enter a number in Number of rejects allowed.
Parallel: Enables parallel processing. If you are using a single system, set the value to NONPARALLEL
to improve performance. If you are using multiple systems, accept the default PARALLEL.
The access driver attempts to divide data files into chunks that can be processed separately. The following file, record, and data characteristics make it impossible for a file to be processed in parallel:
Sequential data sources (such as a tape drive or pipe).
Data in any multibyte character set whose character boundaries cannot be determined starting at an arbitrary byte in the middle of a string. This restriction does not apply to any data file with a fixed number of bytes for each record.
Records with the VAR format
If you imported the external table into the workspace or created the external table without specifying a source file, do not configure these properties. Data characteristics properties are overruled by settings on the Access Parameters tab in the External Table Properties window.
Under Data Characteristics you can set the following properties:
Endian: The default for the Endian property is Platform. This indicates that it is assumed that the endian of the flat file matches the endian of the platform on which it resides. If the file resides on a Windows platform, the data is handled as little-endian data. If the file resides on Sun Solaris or IBM MVS, the data is handled as big-endian. If you know the endian value for the flat file, you can select big or little-endian. If the file is UTF16 and contains a mark at the beginning of the file indicating the endian, then that endian is used.
String Sizes in: This property indicates how data with multibyte character sets, such as UTF16, is handled. By default, the lengths for character strings in the data file are assumed to be in bytes. You can change the selection to indicate that strings sizes are specified in characters.
If you imported the external table into the workspace or created the external table without specifying a source file, do not configure these properties. Field editing properties are overruled by settings on the Access Parameters tab in the External Table Properties window.
Under Field Editing, you can indicate the type of whitespace trimming to be performed on character fields in the data file. The default setting is to perform no trim. All other trim options can reduce performance. You can also set the trim option to trim blanks to the left, right, or both sides of a character field.
Another option is to set the trim to perform according to SQL*Loader trim function. If you select SQL*Loader trim, fixed-length files are right trimmed and delimited files specified to have enclosures are left trimmed only when a field is missing an enclosure.
You can indicate how to handle missing fields in a record. If you set the option Trim Missing Values Null to true, fields with missing values are set to NULL. If you set the property to false, fields with missing values are rejected and written into the specified bad file.
See Oracle Warehouse Builder Data Modeling, ETL, and Data Quality Guide for details.
If a file is associated with an external table, and it has a file name specified, that name is used. The user can configure if a different file must be specified or if multiple files must be specified.
To add a data file:
Right-click the Data Files node and select Create.
Enter a name for the data file such as DATAFILE1.
Your entry displays as a new node in the right panel of the Configuration Properties dialog box.
Enter the following values for each data file you define:
Data File Location: Location for the flat file.
Data File Name: The name of the flat file including its extension. For example, enter myflatfile.dat
.
Oracle Designer is shipped with Oracle Developer Suite. Designer incorporates support for business process modeling, systems analysis, software design and system generation.
Oracle Designer provides a multiuser repository based on Oracle SCM, and is closely integrated with Oracle Forms Developer, Oracle's declarative database application development tool. In this way, Designer allows organizations to design and rapidly deliver scalable, client/server systems that can adapt to changing business needs.This chapter shows you how to import design definitions from Oracle Designer.
This chapter contains the following:
You can create a source module that connects to an Oracle Designer repository. When the definitions for an application are stored and managed in an Oracle Designer repository, the time required to connect to the application is reduced.
Designer repositories use workareas to control versions of an object. By selecting a workarea, you can specify a version of a repository object. With Oracle Designer, you can also group objects into container elements within workareas. Container Elements contain definitions for namespace and ownership of objects, and enable you to view objects even if they are owned by a different user. Because Designer container elements are controlled by workareas, they are version controlled. See the Oracle Designer documentation for more information about workareas and container elements.
All visible objects of a workarea or a container element in Designer are available for use as data sources. To select Designer objects as a source, you must:
Specify a workarea, and
Specify the container element in the workarea
The list of repository objects available for import is determined by the following criteria:
The object type must be supported by Oracle Warehouse Builder (Table, View, Sequence, and Synonyms).
The object must be accessible in the specified workarea. This determines the version of objects accessed.
The object must be visible in the specified container element. The list displays objects owned by the specified container element and other objects shared by the specified container element, but not owned by it.
To import definitions from a Designer source, you must create an Oracle database module.
To create a Designer source module:
Create a database source module that points to a database containing a Designer object.
Follow the steps outlined in "Importing Metadata Definitions from Oracle Database" to create the module.
From the Projects Navigator, double-click the name of the newly created module to open the Edit Module dialog box.
In the Metadata Location tab, select the source type as Oracle Designer Repository. Also select the database location containing the Designer object.
When you select the source type as Oracle Designer Repository, two new lists, Workarea and Container Element, are visible in the Metadata Location tab.
Figure 10-1 displays the Metadata Locations tab of the Edit Module dialog box.
Select the Designer object from the workarea and select the specific container element.
Note: The database you specify as source must contain a Designer object. If not, then the Workarea and Element Container lists do not display any values. |
Click OK.
For related information, see the following sections:
Sources and Targets Guide
11g Release 2 (11.2)
E10582-05
September 2011
Oracle Warehouse Builder Sources and Targets Guide, 11g Release 2 (11.2)
E10582-05
Copyright © 2000, 2011, Oracle and/or its affiliates. All rights reserved.
Primary Author: Richa Agarwala
Contributors: Antonio Romero, Michelle Bird, Joyce Scapicchio, David Allan, Linda Bittarelli, Ron Gonzalez, Shawn Wu, Veenavani Revanuru, Ramesh Uppala, Alex Wu, Jean-Pierre Dijcks, Brian Maher, Gary Tripp, Xuelin Lu, Bojana Simova, Lyudmila Mogilevich, Ting Liao, Frank Yang, Justin Ho, Robert Paul, Adrian Scott, Robert Velisar, Alex Zhang, Winnie Wan, John Leigh, Thomas Lau, Geoff Watters, Padmaja Potineni, Cathy Shea, Roza Leyderman
This software and related documentation are provided under a license agreement containing restrictions on use and disclosure and are protected by intellectual property laws. Except as expressly permitted in your license agreement or allowed by law, you may not use, copy, reproduce, translate, broadcast, modify, license, transmit, distribute, exhibit, perform, publish, or display any part, in any form, or by any means. Reverse engineering, disassembly, or decompilation of this software, unless required by law for interoperability, is prohibited.
The information contained herein is subject to change without notice and is not warranted to be error-free. If you find any errors, please report them to us in writing.
If this is software or related documentation that is delivered to the U.S. Government or anyone licensing it on behalf of the U.S. Government, the following notice is applicable:
U.S. GOVERNMENT RIGHTS Programs, software, databases, and related documentation and technical data delivered to U.S. Government customers are "commercial computer software" or "commercial technical data" pursuant to the applicable Federal Acquisition Regulation and agency-specific supplemental regulations. As such, the use, duplication, disclosure, modification, and adaptation shall be subject to the restrictions and license terms set forth in the applicable Government contract, and, to the extent applicable by the terms of the Government contract, the additional rights set forth in FAR 52.227-19, Commercial Computer Software License (December 2007). Oracle America, Inc., 500 Oracle Parkway, Redwood City, CA 94065.
This software or hardware is developed for general use in a variety of information management applications. It is not developed or intended for use in any inherently dangerous applications, including applications that may create a risk of personal injury. If you use this software or hardware in dangerous applications, then you shall be responsible to take all appropriate fail-safe, backup, redundancy, and other measures to ensure its safe use. Oracle Corporation and its affiliates disclaim any liability for any damages caused by use of this software or hardware in dangerous applications.
Oracle and Java are registered trademarks of Oracle and/or its affiliates. Other names may be trademarks of their respective owners.
Intel and Intel Xeon are trademarks or registered trademarks of Intel Corporation. All SPARC trademarks are used under license and are trademarks or registered trademarks of SPARC International, Inc. AMD, Opteron, the AMD logo, and the AMD Opteron logo are trademarks or registered trademarks of Advanced Micro Devices. UNIX is a registered trademark of The Open Group.
This software or hardware and documentation may provide access to or information on content, products, and services from third parties. Oracle Corporation and its affiliates are not responsible for and expressly disclaim all warranties of any kind with respect to third-party content, products, and services. Oracle Corporation and its affiliates will not be responsible for any loss, costs, or damages incurred due to your access to or use of third-party content, products, or services.
For different types of data sources and targets, Oracle Warehouse Builder provides different connection methods.
This chapter introduces the data sources and targets and specific connectivity technologies supported by Oracle Warehouse Builder. It includes the following topics:
Table 1-1 lists the data storage systems and applications that Oracle Warehouse Builder 11g Release 2 (11.2) can access. The table lists the supported sources and targets for each type of application.
Table 1-1 Sources and Targets Supported in Oracle Warehouse Builder 11g Release 2 (11.2)
Application Type | Supported Sources | Supported Targets |
---|---|---|
Oracle Database |
Oracle Database releases 9.2, 10.1, 10.2, 11.1,11.2 |
Oracle Database releases 9.2, 10.1, 10.2, 11.1, 11.2 Note: Connectivity among database versions over database links may depend upon the version of the database where an ETL mapping is deployed and executing. Refer to the documentation for your database version for details about any limitations on database links between database versions. |
Non-Oracle Databases |
|
|
Files |
Delimited and fixed-format flat files. |
Delimited, fixed-format, and XML format flat files. |
Business Applications |
|
None |
Process Flows and Schedules/Oracle Workflow |
None |
Oracle Workflow releases 2.6.2, 2.6.3, 2.6.4, 11i |
Process Flows and Schedules/Concurrent Manager |
None |
Any Oracle Database location, release 10g or later. To deploy a schedule in Concurrent Manager, Release 11i or 12i is required. However, for both releases, you must select 11i as the version when you create a location in Oracle Warehouse Builder. |
Business Intelligence/Discoverer |
None |
Oracle BI Discoverer Release 10.1, Oracle Business Intelligence Suite Enterprise Edition |
Oracle Designer |
Oracle Designer 6i, 9i, 10g |
None |
You can directly connect to an Oracle database and import metadata from the available database objects or deploy target objects to the database. To connect to a database on a remote host, you must provide the network credentials to connect to the host. See "Importing Metadata Definitions from Oracle Database" for more information about connecting to an Oracle database.
Oracle Warehouse Builder communicates with non-Oracle systems using Oracle Database Heterogeneous Services and a complementary agent. Heterogeneous Services make a non-Oracle system appear as if it were a remote Oracle Database server. The agent can be an Oracle Database Gateway or the generic Open Database Connectivity (ODBC) agent included with Oracle Database.
Figure 1-1 describes how Oracle Database uses Heterogeneous services to access a remote non-Oracle source.
Figure 1-1 Heterogeneous Services Architecture
The Heterogeneous Services component in the database communicates with the Heterogeneous Services agent process. The agent process, in turn, communicates with the remote database.
The agent process consists of agent-generic code and a system-specific driver. All agents contain the same agent-generic code. But each agent has a different driver depending on the type of data being sourced.
Oracle Database gateways provide transparent connections to non-Oracle databases. When using a gateway, you can access these non-Oracle databases just as you would an Oracle database, including importing object metadata and accessing data as source and target. See Chapter 4, "Connecting to Non-Oracle Data Sources Through Gateways" for details of connecting to different databases through gateways.
To connect to data sources that support Java Database Connectivity (JDBC), you must use the appropriate JDBC driver for that data source. The JDBC driver for a non-Oracle database or other data source may be installed with the product, or may require a separate download or purchase. For detailed information about connecting to various data sources using JDBC, see Chapter 6, "Connecting to Data Sources Through JDBC".
To connect through JDBC, you must install the appropriate JDBC drivers for the database. Most of these drivers are shipped with the database. They are also developed by third-party vendors and are usually available as free downloads. The database objects, such as tables, that you import through a JDBC connection can be used only in Code Template mappings. These database objects cannot be used with other mappings, such as PL/SQL mappings, that you create in Oracle Warehouse Builder.
To connect through a gateway, you must install Oracle Gateway for the specific database. A gateway enables you to access data from non-Oracle databases in the same way that you access data from Oracle Database. The database objects that you import through a gateway connection can therefore be used in any of the mappings that you create in Oracle Warehouse Builder.
Oracle Warehouse Builder can leverage support for ODBC provided by the Oracle Database to integrate with any data source that supports ODBC connectivity. ODBC provides a generic connectivity that is intended for low-end data integration solutions and the transfer of data is subject to the rules of specific ODBC or object linking and embedding (OLE) database drivers installed on the client computer. You need not install database-specific agents to connect to different data sources. Instead, you can use the generic connectivity agent included with Oracle Database. You must still create and customize an initialization file for your generic connectivity agent. For detailed information about connecting to data sources using ODBC connectivity, see "Connecting to an ODBC Data Source".
Using Oracle Warehouse Builder, you can also connect to ERP and CRM applications, such as SAP, Oracle E-Business Suite, Peoplesoft, and Siebel.
You can also connect to Oracle's Customer Data Hub (CDH), Universal Customer Master (UCM), and Product Information Management (PIM).
The application adapters for Oracle applications provide additional metadata to simplify ETL design from such sources, but connecting to these sources depends upon underlying database connectivity. For example, metadata extraction from E-Business Suite, which is hosted on Oracle database, is done using database links, while metadata extraction from a Peoplesoft application hosted on a DB2 database depends on having the DB2 gateway installed on your target database. You can also connect to Peoplesoft using an alternative ODBC driver.Connecting to an SAP system and extracting data is accomplished using native SAP R/3 ABAP code and data extraction techniques fully supported by SAP.When using the application connectors, the details of the underlying connection technologies for different sources are generally hidden from the user, which simplifies managing the connectivity.
For more information about connecting to Oracle E-Business Suite, Peoplesoft, and Siebel, see Chapter 8, "Integrating with Oracle ERP Applications".
For information about extracting data from SAP systems, see Chapter 7, "Extracting Data from SAP Applications".
In some cases, the data movement provided by Oracle-to-Oracle database links, gateways, and ODBC may not be sufficient. Oracle Warehouse Builder 11g Release 2 (11.2) also supports a framework that adds more flexible data movement options based on code templates.
When designing an ETL mapping, you can now choose between Oracle-based mappings and code template-based mappings for more flexible connectivity and data movement. Both mappings offer a rich set of data transformation operators.
When using code template-based mappings, you can select code templates to assign alternative data movement methods for individual mappings or specific parts of mappings. Oracle Warehouse Builder generates executable code based on the templates you select, and then deploys that code to a Control Center Agent, where it executes.
The JDBC connectivity for data movement depends on using code template-based mappings, and the data movement code actually executes in the control center agent. You can choose alternative templates for other data movement techniques such as bulk data extraction and loading that fit your use case better. You can also construct new templates that implement data movement methods not supported by Oracle Warehouse Builder out of the box.
For more information about using code templates, see Chapter 12, "Using Code Templates to Load and Transfer Data". Also see Oracle Warehouse Builder Data Modeling, ETL, and Data Quality Guide for more details on code templates-based ETL mappings.
Choosing among the different connection technologies available depends upon your specific data source type and other specifics of your use case:
Choose Oracle gateways for fully supported end-to-end connectivity with non-Oracle databases, and the most transparent access to those databases from within Oracle Warehouse Builder.
Choose JDBC connectivity in instances where you need simplified setup of flexible connectivity with good performance across a wide range of non-Oracle data sources.
Choose ODBC connectivity for sources where data volumes are relatively small and maximum performance is not a concern.
Use application connectors when working with any supported ERP, CRM, or MDM application source or target.
You can connect to a wide variety of non-Oracle databases and import metadata and data from these sources using JDBC connectivity.
This chapter provides connection details for a non-Oracle data sources that can be accessed through JDBC, and generic connection information. It contains the following topics:
JDBC connectivity is used with code templates-based mappings. See Oracle Warehouse Builder Data Modeling, ETL, and Data Quality Guide for more details about these mappings.
You can connect to any data source that supports JDBC connectivity. To connect to the data source, you require the JDBC driver for that data source and the URL format to set up the connection. For any database, download the required JDBC driver into OWB_HOME
/owb/lib/ext
.
You can connect to a DB2 database using a JDBC connection. Ensure that the following prerequisites are met before connecting to a DB2 database.
JDBC Connection Drivers for DB2
You must download the following jar
files into OWB_HOME
/owb/lib/ext
on your client system:
db2jcc.jar
db2jcc_license_cu.jar
See Also: Oracle Warehouse Builder Data Modeling, ETL, and Data Quality Guide for more information about using code template mappings. |
Before you can import metadata from a DB2 database, you must create a DB2 module to store the metadata.
To create a DB2 module:
Right-click DB2 under the Databases node in the Projects Navigator and select New DB2 Module.
The Create Module Wizard is displayed.
Click Next to open the Name and Description page.
Provide a name, description (optional), and the access method. Select the access method Native Database Connection, which implies using a JDBC driver to make the connection.
Click Next to open the Connection Information page.
You can select from an existing location or provide new location details.
To provide a new location, click Edit on the Connection Information page to open the Edit DB2 Location dialog box.
Provide the following details in the Edit DB2 Location dialog box:
User Name: The user name to connect to the host system.
Password: The password for the user name.
Host: The host system where the database resides.
Port: The port number is usually 50000 for the DB2 connection.
Database: The database name.
Schema: The schema from which objects are to be imported.
Version: The database version.
Click Test Connection to ensure that the connection is valid.
Click OK to return to the Connection Information page.
Click Next, and then click Finish in the Summary page after verifying the specified details.
The newly created module is available under the DB2 node in the Projects Navigator. A DB2 module supports the following data objects:
Transformations
Tables
Views
Sequences
Note: Temporary tables can be created in the work schema when code template mappings run. To change the work schema, edit the location and use the Advanced tab. |
To import metadata into a module:
Right-click the DB2 module and select Import, then Database Object.
The Import Metadata Wizard is displayed.
In the Filter Information page, select the object types to be imported.
In the Object Selection page, select the objects to be imported. Also, specify whether dependent objects should be selected.
In the Summary page, verify the objects you selected.
Click Finish to begin the import.
In the Import Results dialog box, click OK to confirm the import action. Click Undo to cancel the import.
You can connect to a SQL Server database using a JDBC connection.
JDBC Connection Driver for SQL Server
To connect using JDBC, you must place the jar file sqljdbc.jar
into OWB_HOME
/owb/lib/ext
on your client system.
This jar file is available for download at the Microsoft download center.
Before you can import metadata from a SQL Server database, you must create a SQL Server module to store the metadata.
To create a SQL Server Module:
Right-click SQL Server under the Databases node in the Projects Navigator and select New SQL Server Module.
The Create Module Wizard is displayed.
Click Next to open the Name and Description page.
Provide a name, description (optional), and the access method. Select the access method Native Database Connection, which implies using a JDBC driver to make the connection.
Click Next to open the Connection Information page.
You can select from an existing location or provide new location details.
To provide a new location, click Edit on the Connection Information page to open the Edit SQL Server Location dialog box.
Provide the following details in the Edit SQL Server Location dialog box:
User Name: The user name to connect to the host system.
Password: The password for the user name.
Host: The host system where the database resides.
Port: The port number is usually 1433 for the SQL Server connection.
Database: The database name.
Schema: The schema from which objects are to be imported.
Version: The database version.
Click Test Connection to ensure that the connection is set.
Click OK to return to the Connection Information page.
Click Next, and then click Finish in the Summary page after verifying the specified details.
The newly created module is available under the SQL Server node in the Projects Navigator. A SQL Server module supports the following data objects:
Transformations
Tables
Views
Sequences
To import metadata into a module:
Right-click the SQL Server module and select Import, then Database Object.
The Import Metadata Wizard is displayed.
In the Filter Information page, select the object types to be imported.
In the Object Selection page, select the objects to be imported. Also specify whether dependent objects should be selected.
In the Summary page, verify the objects you selected.
Click Finish to begin the import.
In the Import Results dialog box, click OK to confirm the import action. Click Undo to cancel the import.
After you create a JDBC connection and import metadata from data objects, you can extract data from these objects and load it to target data sources by performing extraction, transformation, and loading (ETL) operations. However, to perform ETL operations on JDBC connected-data objects, you can use only code template mappings. A limited set of operators are supported for code template mappings. All operators are supported for Oracle target in code template mappings. For more information about code templates, see Chapter 12, "Using Code Templates to Load and Transfer Data". For more information about ETL operations and different types of mappings including PL/SQL mappings and code template mappings, see the Oracle Warehouse Builder Data Modeling, ETL, and Data Quality Guide.
To import metadata definitions from other databases using JDBC drivers, you must create a new platform in Oracle Warehouse Builder. A platform refers to a data source. See Chapter 11, "Creating New Platforms" for more information about platforms.
This preface includes the following topics:
This guide is written for Oracle Database administrators and others who create warehouses using Oracle Warehouse Builder.
For information about Oracle's commitment to accessibility, visit the Oracle Accessibility Program website at http://www.oracle.com/pls/topic/lookup?ctx=acc&id=docacc
.
Access to Oracle Support
Oracle customers have access to electronic support through My Oracle Support. For information, visit http://www.oracle.com/pls/topic/lookup?ctx=acc&id=info
or visit http://www.oracle.com/pls/topic/lookup?ctx=acc&id=trs
if you are hearing impaired.
In this guide, Windows refers to the Windows NT, Windows 2000, and Windows XP operating systems. The SQL*Plus interface to Oracle Database may be referred to as SQL.
In the examples, an implied carriage return occurs after each line, unless otherwise noted. You must press the Return key after a line of input.
The following table lists the conventions used in this guide:
Convention | Meaning |
---|---|
. . . | Vertical ellipsis points in an example mean that information not directly related to the example has been omitted. |
... | Horizontal ellipsis points in statements or commands mean that parts of the statement or command not directly related to the example have been omitted. |
boldface text | Boldface type in text refers to interface buttons and links. Boldface type also serves as emphasis to set apart main ideas. |
italicized text | Italicized text applies to new terms introduced for the first time. Italicized text also serves as an emphasis on key concepts. |
unicode text | Unicode text denotes exact code, file directories and names, and literal commands. |
italicized unicode text | Italicized unicode text refers to parameters whose value is specified by the user. |
[] | Brackets enclose optional clauses from which you can choose one or none. |
Help is readily available throughout Oracle Warehouse Builder:
Menus: Menu bars throughout Oracle Warehouse Builder contain a Help menu. For context-sensitive information, choose Topic from the Help menu.
Wizards and dialog boxes: Detailed instructions are provided on the pages of the wizards, which take you step-by-step through the process of creating an object. Click the Help button for additional information about completing a specific dialog box or a page of a wizard.
Tools: You can identify the tools on a toolbar by the tooltips that appear when you rest the mouse over the icon.
Some toolbars include a Help icon, which displays the Contents page of the Help system.
Lists: For items presented in lists, a description of the selected item displays beneath the list.
Shortcut menus: Click the arrow icon on the right side of the title bar for a window. Then, choose Help from the shortcut menu for context-sensitive information.
In addition to the Sources and Targets Guide, the Oracle Warehouse Builder documentation set includes the following:
Oracle Warehouse Builder Installation and Administration Guide
Oracle Warehouse Builder Data Modeling, ETL, and Data Quality Guide
In addition to the Oracle Warehouse Builder documentation set, you can also reference Oracle Database Data Warehousing Guide.
In Oracle Warehouse Builder, you can access data from a variety of sources. You can interpret and extract metadata from custom, and also packaged applications and databases. As a precursor to extracting any data set, you first import its metadata.
This chapter contains the following topics:
Metadata is data that describes the contents of objects in a data set. For example, the metadata for a table includes such information as the name of the table and the names and data types of columns, relationships between this table and other objects, and so on. When working with objects in data sources not created within Oracle Warehouse Builder, you must first import metadata from those sources.
Oracle Warehouse Builder groups metadata for objects in different data sources in modules, which are visible in the Projects Navigator. The type of module you create depends on the source from which you are importing metadata. For example, to import metadata definitions from an Oracle database, create an Oracle module. To import metadata definitions from flat files, create a flat file module.
Whether you want to import metadata from a table, file, or application, the general process is the same.
To import metadata from a source:
Review the list of supported sources and targets in Table 1-1, "Sources and Targets Supported in Oracle Warehouse Builder 11g Release 2 (11.2)" to determine if the source from which you want to extract data is supported in Oracle Warehouse Builder.
Select an existing location or create a location as described in "Creating Locations".
Create a module for the source metadata as described in "Creating Modules".
Right-click the module and select Import.
You can import metadata from database objects, flat files, COBOL copybook files, and Oracle Warehouse Builder metadata.
Follow the prompts in the Import Metadata Wizard.
The wizard prompts you for information based on the type of source you selected. For more information, see "Using the Import Metadata Wizard".
Subsequent Steps
For most data sources, after importing the metadata of the data objects, you can view the data stored in these objects.
To move the data using Oracle Warehouse Builder, you can design ETL logic that extracts the data from the source, transforms the data, and loads it into a target schema.
Over a period, the source metadata may change. If this occurs, you can use Oracle Warehouse Builder to identify the ETL logic that would be impacted and potentially made invalid due to a change in metadata.
To introduce the changed metadata into Oracle Warehouse Builder, right-click the desired module and select Import. As described in "Reimporting Definitions", Oracle Warehouse Builder recognizes when you are reimporting metadata.
Locations enable you to store the connection information to the various files, databases, and applications that Oracle Warehouse Builder accesses for extracting and loading data. Similarly, locations also store connection information to ETL management tools and Business Intelligence tools. For a detailed listing, see Table 1-1.
Oracle Database locations and file locations can be sources, targets, or both. For example, you can use a location as a target for storing data temporarily or as a staging table. Later, you can reuse that location as a source to populate the final target.
In some cases, such as with flat file data, the data and metadata for a given source are stored separately. In that case, create one location for the connection information for the data and another for the connection information for the metadata.
Automatically Created Locations
During installation, Oracle Warehouse Builder creates an Oracle location named OWB_REPOSITORY_LOCATION
. This location provides the connection details to the Oracle Warehouse Builder workspace.
Types of Locations
You can deploy to several different types of locations. These locations are available on the Locations Navigator of the UI. Each location type has a different use:
Databases: Targets for either relational or dimensional systems, including objects such as tables and views, or dimensions and cubes. See, Oracle Warehouse Builder Data Modeling, ETL, and Data Quality Guide for more details about these objects.
Files: Targets for storing data in delimited, fixed, or XML format.
Applications: Targets for Oracle E-Business Suite, PeopleSoft, Siebel, and SAP systems.
Process Flows and Schedules: Indicates an Oracle Workflow location.
Business Intelligence: Targets for deploying metadata derived from databases or Oracle modules. This is then used by business intelligence tools.
URI Locations: URI locations are used internally as part of the definition of other locations. You must not create any instances of it.
Agents: Specifies the location of a control center agent or an application server.
Transportable Modules: For defining transportable module sources and targets.
You can create your own locations to use as sources or targets.
To create a location:
In the Locations Navigator, expand the Locations node and then expand the node that represents the type of location you want to create.
For example, to create an Oracle database location, expand the Locations node, the Databases node, and then the Oracle node.
Right-click the type of location and select New <Object> Location.
The Create <Object> Location dialog box is displayed.
Or, right-click Locations and select New. This opens the New Gallery dialog box. Select a location type from the list of items and click OK.
The Create <Object> Location dialog box is displayed.
Complete the dialog box. Click the Help button for additional details.
Provide the required connection details in the Details tab.
Using SQL*Net to Create Locations
When you create Oracle locations of type SQL*Net, you must set up a transparent network substrate (TNS) name entry for these locations. The TNS name must be accessible from the Oracle Warehouse Builder client home. Run the Net Configuration Assistant from the Oracle Warehouse Builder client home. See Oracle Database Enterprise User Security Administrator's Guide for information about using the Net Configuration Assistant.
After setting up the TNS name entry, restart the control center service so that it can pick up the changes. Furthermore, if the Warehouse Builder control center home is distinct from the Oracle Database home, then the same TNS name entry must be defined in the Oracle Database home as well. Run the Net Configuration Assistant from the Oracle Database home and specify the same TNS name there as well.
Note: If the TNS names in the Control Center home and the Oracle Database home are different, then connection errors may occur during deployment and execution. |
About Locations, Passwords, and Security
Because all Oracle Warehouse Builder users can view connection information in a location, passwords are always encrypted. Furthermore, Oracle Warehouse Builder administrators can determine whether to allow locations to be shared and persistent across design sessions. By default, locations are not shared or persisted.
See Also: Oracle Warehouse Builder Installation and Administration Guide for more information about "Managing Passwords". |
Some deployments require the owner of the target location to have more powerful privileges than are granted when creating a new user:
Upgrade action
End User Layer (EUL) deployment
A privileged database user can grant the additional privileges.
For ETL, the owner of the target location must have sufficient privileges to read data from the source location. If the source location is a database table, for example, the owner of the target must have SELECT
privileges on the table. Similarly, for locations pertaining to Transportable Modules sources and targets, users require additional privileges as described in Oracle Warehouse Builder Data Modeling, ETL, and Data Quality Guide.
Upgrade Action
The GRANT_UPGRADE_PRIVILEGES
PL/SQL script grants the target user the necessary roles and privileges for the upgrade action. Use this syntax:
@%OWB_HOME
%/owb/rtp/sql/grant_upgrade_privileges
username
OWB_HOME
is the home directory for Oracle Warehouse Builder on the target system.
username
is the owner of the target location.
For example, the following command grants privileges on a Windows system to the SALES_TARGET
user.
@%OWB_HOME
%\owb\rtp\sql\grant_upgrade_privileges
sales_target
EUL Deployment
Oracle BI Discoverer locations require the EUL user to have the CREATE DATABASE LINK
privilege.
Locations must be created during the design process. All modules, including their source and target objects, must have locations associated with them before they can be deployed. You cannot view source data or deploy target objects unless there is a location defined for the associated module.
Registering a location in a control center establishes a link between the workspace and the locations of source data and deployed objects. You can register a location in multiple control centers. See Oracle Warehouse Builder Concepts for more information about control centers.
You can change the definition of a location before it is registered. However, after the location is registered, you can change only the password. To edit other details of a location or one of its connectors, you must first unregister the location from all the control centers where it is registered. Unregistering a location deletes the deployment history of the location.
Locations are registered automatically by deployment. Alternatively, you can explicitly register a location in the Control Center.
To register a location:
Select the required project.
Select Tools, Control Center Manager to open the Control Center Manager.
Right-click the location and click Register.
The Location dialog box is displayed.
Check the location details carefully.
Click Help for additional information.
Click Test Connection to verify the connection details.
Click OK.
To unregister a location:
Select Tools, Control Center Manager to open the Control Center Manager.
Right-click the location and click Unregister.
Click OK to confirm the action.
To delete a location:
Right-click the location in Locations Navigator and select Delete.
If the Delete option is not available here, this indicates that the location has been registered in a control center and is likely being used. See "Locations Registered in Multiple Control Centers" for more information.
Verify that the location is not in use, unregister the location in the Control Center Manager, and then delete the location from Locations Navigator.
After you register a location in a control center, the connection details of the location are locked. You can edit the connection details or delete the location only after unregistering it from the control center.
It is also likely that as part of your project requirements, a location is registered in multiple control centers. In such a scenario, you cannot edit the connection details of the location or delete the location unless you unregister the location from all the control centers where it is registered.
To see the details of all the control centers where a location is registered:
On the Locations Navigator, right-click the location and click Open.
The Edit Location dialog box is displayed.
Click Registration to view the list of control centers where the location is registered.
A DB connector or Directory is a logical link between a source location and a target location. The connector between schemas in two different Oracle Databases is implemented as a database link, and the connector between a schema and an operating system directory is implemented as a database directory.
To create a database directory, a user requires the CREATE DIRECTORY
and DROP DIRECTORY
privileges. When you create an Oracle Warehouse Builder user, these privileges are not automatically granted to the user. Therefore, the database administrator must explicitly grant these privileges to the Oracle Warehouse Builder user. For example:
GRANT CREATE ANY DIRECTORY TO OWB_USER; GRANT DROP ANY DIRECTORY TO OWB_USER;
where OWB_USER
is an Oracle Warehouse Builder user performing the deployment.
Or else, a user with these privileges must create the link connectors and grant you access to use them. You can then create the connectors manually and select the database link or directory from a list.
Note: To create a Database Link, a user requires theCREATE DATABASE LINK privilege. This privilege is granted automatically when an Oracle Warehouse Builder user is created. |
See Also:
|
To manually create a database connector:
In the Locations Navigator, expand the Locations folder and then expand the subfolder for the target location.
Right-click DB Connectors and select New DB Connector.
Follow the steps in the Create Connector Wizard.
To manually create a directory connector:
In the Locations Navigator, expand the Locations folder and then expand the subfolder for the target location.
Right-click Directories and select New Directory.
The Create Connector Wizard opens.
Follow the steps and create a directory connector.
Modules are grouping mechanisms in the Projects Navigator that correspond to locations in the Locations Navigator. A single location can correspond to one or more modules. However, a given module can correspond to only one metadata location and data location at a time.
The association of a module to a location enables you to perform certain actions more easily in Oracle Warehouse Builder. For example, group actions such as creating snapshots, copying, validating, generating, deploying, and so on, can be performed on all the objects in a module by choosing an action on the context menu when the module is selected.
You can create a module from the Projects Navigator.
To create a module:
Expand the Projects Navigator until you find the node for the appropriate metadata type.
For example, if the source data is stored in Oracle Database, then expand the Databases node to view the Oracle node. If the source data is in an SAP R/3 system, expand the Applications node to view the SAP node.
Right-click the desired node and select New<Module Type>.
The Create Module Wizard opens.
You can also right-click the desired node and select New. This opens the New Gallery dialog box. You can now select the item you want to create (module) and click OK.
The Create Module Wizard opens.
On the Name and Description page, provide a name and an optional description for the module. For non-Oracle sources and applications, you must not select the access method. Select from Native Database Connection and Oracle Gateway.
Click Next.
The Connection Information page is displayed.
Provide details about the location that is associated with this module.
The contents of the Connection Information page depend on the type of module you create. For more information about providing information about this page, click Help.
Click Next to display the Summary page.
Review the information you provided and click Back to modify entered values.
Click Finish.
While using Oracle Warehouse Builder, you must not associate a module with a new location. For example, assuming your production environment uses different locations than those used by your development environment, then you must change the module associations when moving code from the production to the development environment.
To change the location associated with a module, you must edit the configuration properties of the module. Configuration properties define the physical information pertaining to the metadata.
To change the location associated with a module:
In the Projects Navigator, right-click the module and select Configure.
The Configuration Properties editor is displayed.
In the Identification node, select a new value for the Locations property. If the desired location is not in the list, then edit the module and add the location.
See Oracle Warehouse Builder Data Modeling, ETL, and Data Quality Guide for more information about "Configuring Data Objects".
After you create a module for a particular object such as an Oracle database, you can view all the associated objects under the database such as Mappings, Transformation, Tables, and so on.
You can also create your own folder, called User Folder, under a module. You can then define the required objects within the folder. For example, related tables and views that must be generated or deployed can be placed under a common folder. User Folders provide more flexibility in organizing objects within a module.
To create a User Folder:
Right-click a module, and click New.
The New Gallery dialog box is displayed.
Select User Folder from the list of items and click OK.
The Create User Folder dialog box is displayed.
Provide a name and description (optional), and click OK.
The newly created user folder is now available under the module. The folder is empty with no nodes under it. All the objects that can be added under a module can also be added under the newly created user folder. For example,
To add a table:
Right-click the folder, and click New.
The New Gallery dialog box is displayed.
Select Table from the list of items and click OK.
The Create Table dialog box is displayed.
Provide a name and description (optional) and click OK.
The newly created table is now available under the Tables node within the folder.
Within a user folder, you can also:
Create other user folders.
Copy valid objects from other user folders.
Copy valid objects from other compatible module types.
Use the Import Metadata Wizard to import metadata definitions into modules.
The Import Metadata Wizard supports importing of tables, views, materialized views, dimensions, cubes, external tables, sequences, user-defined types, and PL/SQL transformations directly or through object lookups using synonyms.
Importing a table includes importing its columns, primary keys, unique keys, and foreign keys, which enable the import of secondary tables. When you import an external table, Oracle Warehouse Builder also imports the associated location and directory information for the associated flat file.
You can import metadata definitions either from the Oracle Database catalog or Designer/2000 (Oracle Designer).
Create an Oracle module to store the imported metadata.
To create an Oracle module:
From the Projects Navigator, right-click Oracle under the Databases node and select New Oracle Module.
The Create Module Wizard is displayed.
On the Name and Description page, provide a name and an optional description for the module. Click Next to open the Connection Information page.
Use the Connection Information page to select a database location for the module. To define a new location, click Edit. The Edit Oracle Database Location dialog box is displayed. See "Edit Oracle Database Location Dialog Box" for the connection parameters to be entered in this dialog box.
Click OK to open the Summary page.
Verify the specified details on the Summary page and click Finish.
The newly created Oracle module is now available under the Oracle node in the Projects Navigator.
Use this dialog box to specify the location details of an Oracle location.
Name
A name for the location.
Description
An optional description.
Connection Type
Lists the connections available for access to a database location. You cannot change the type after creating the location. There are four connection types available: HOST:PORT:SERVICE
, Database Link
, SQL*NET Connection
, and OCI
.
Note: When the source and target locations are on the same host, be su-aҞre to identify them in the same way. Otherwise, the product treats them as separate locations and creates a database link between them. The database link may slow down the loading of data.Common mistakes of this type include the following:
|
HOST:PORT:SERVICE: Makes a connection using the Easy Connect Naming method, which requires no prior setup:
User Name: The database user credential that has permission to access the schema location.
When connecting to a database that does not have user names, enter any text as a mock user name.
Password: The password associated with user name.
When connecting to a database that does not have passwords, enter any text as a mock password.
Host: The name of the system where the database is installed.
If Oracle Warehouse Builder is installed on the same system as the Oracle database, you can enter localhost
instead of the computer name. If the database resides on a remote system, then provide the internet protocol (IP) address of the remote system.
Port: The SQL port number for the database.
Service Name: The service name of the database.
Use Global Name: The unique name of the database, which is composed of the database name and the domain in the form database_name.database_domain. For example, orcl.us.example.com
identifies the orcl
database in the us.example.com
domain. Select this option when connecting to a database on a different network.
Database Link: Makes a connection to another database using an existing database link. Select this method only when you do not have privileges that enable you to make a direct connection. You cannot deploy to a location that uses a database link. Not available for Oracle Business Intelligence or Discoverer locations.
A database link is a schema object that contains information for connecting to a remote database. Database links are used in distributed database environments and enable a client to access two physical databases as one logical database.
From Location: An existing location where the database link is defined.
Database Link: The object name of the database link.
SQL*NET Connection: Makes a connection using a net service name previously defined using a tool such as Oracle Net Configuration Assistant. The net service name provides a convenient alias for the connection information. This method of connecting is the best for Oracle RAC installations.
User Name: The database user credential that has permission to access the schema location.
When connecting to a database that does not have user names, enter any text as a mock user name.
Password: The password associated with user name.
When connecting to a database that does not have passwords, enter any text as a mock password.
Net Service Name: The name of the predefined connection.
Use Global Name: The unique name of the database, which is composed of the database name and the domain in the form database_name.database_domain. For example, orcl.us.example.com
identifies the orcl
database in the us.example.com
domain. Select this option when connecting to a database in a different network.
OCI: Makes a connection using Oracle Call Interface (OCI) to interact with an Oracle database. This connection type uses the JDBC OCI driver that is specific to your version of Oracle database and your platform. Use this method when you need a high degree of compatibility with an earlier release of Oracle. The JDBC OCI drivers enable you to call the OCI directly from Java.
User Name: The database user credential that has permission to access the schema location.
When connecting to a database that does not have user names, enter any text as a mock user name.
Password: The password associated with user name.
When connecting to a database that does not have passwords, enter any text as a mock password.
Net Service Name: The name of the predefined OCI connection.
Use Global Name: The unique name of the database, which is composed of the database name and the domain in the form database_name.database_domain. For example, orcl.us.example.com
identifies the orcl
database in the us.example.com
domain. Select this option when connecting to a database in a different network.
Schema
The schema where the source data is stored or the target objects are deployed. The schema must be registered. By default, it is the user name schema.
When connecting to a type of database that does not have schemas, do not enter any value in this field.
Version
The version number of Oracle Database. Not available for non-Oracle database locations.
Test Connection
Attempts to make a connection using the values provided on this page.
Test Results
A message that reports whether a test connection succeeded or failed.
Use the Import Metadata Wizard to import metadata from an Oracle database into the module.
To import metadata definitions from an Oracle database:
Right-click the newly created Oracle module and select Import, then Database Objects.
The Welcome page of the Import Metadata Wizard is displayed. This page lists the steps to import object metadata. Click Next to proceed with the import.
Complete the following:
Use the Filter Information page to limit the search using one of the following methods:
Selecting the Object Types The Object Type section displays the types of database objects that you can import. These objects include tables, dimensions, external tables, sequences, materialized views, cubes, views, PL/SQL transformations, and user-defined types. Select the types of objects you want to import. For example, to import tables and views, select Tables and Views.
Search Based on the Object Name Use the Only select objects that match the pattern option to specify a search pattern. Oracle Warehouse Builder searches for objects whose names match the pattern specified. Use the percent sign (%
) as a wildcard match for multiple characters and an underscore (_
) as a wildcard match for a single character. For example, you can enter a warehouse project name followed by a percent sign (%
) to import objects that begin with that project name.
Click Next to retrieve names that meet the filter conditions from the data dictionary. Oracle Warehouse Builder then displays the Object Selection page.
Select items to import from the Available list and click the right arrow to move them to the Selected list. If you are reimporting definitions, previously imported objects appear in bold.
To search for specific items by name, click the Find Objects icon that looks like a flashlight.
To move all items to the Selected Objects list, click Move All.
Importing Dependent Objects The Import Metadata Wizard enables you to import the dependent objects of the object being imported.
Select one of the following options to specify if dependent objects should be included in the import:
None: Moves only the selected object to the Selected list. No dependencies are imported when you select this option.
One Level: Moves the selected object and the objects it references to the Selected list. This is the default selection.
All Levels: Moves the selected object and all its references, direct or indirect, to the Selected list.
Click Next to display the Summary and Import page.
Importing Dimensions When you import a dimension that uses a relational implementation, the implementation table that stores the dimension data is not imported. You must explicitly import this table by moving the table from the Available list to the Selected list on the Object Selection page. Also, after importing the table, you must bind the dimension to its implementation table. For more information about how to perform binding, refer to Oracle Warehouse Builder Data Modeling, ETL, and Data Quality Guide.
This page summarizes your selections in a spreadsheet that lists the name, type of object, and whether the object are reimported or created. Verify the contents of this page and add descriptions, if required, for each of the objects.
You can specify additional properties for objects that have been imported into the module. Click Advanced Import Options to specify these properties. The Advanced Import Options dialog box is displayed. For more information about the contents of this dialog box, see "Advanced Import Options". For more information about reimporting definitions, see "Reimporting Definitions".
Click Finish to import the selected objects. The Importing Progress dialog box shows the progress of the import activity. After the import completes, the Import Results page is displayed.
This page summarizes the import result, and lists the objects and details about whether the object was created or synchronized.
Click OK to accept the results. To save a metadata loader (MDL) file associated with this import, click Save. Oracle Warehouse Builder stores the definitions in the database module from which you performed the import.
Reimporting your source database definitions enables you to import changes made to your source metadata after your previous import. You do not have to remove the original definitions from the workspace. Oracle Warehouse Builder provides you with options that also enable you to preserve any changes you may have made to the definitions since the previous import activity. This includes any new objects, foreign keys, relationships, and descriptions you may have created in Oracle Warehouse Builder.
To reimport definitions:
Right-click a data source module name and select Import.
The Welcome page for the Import Metadata Wizard is displayed.
Click Next.
The Filter Information page is displayed.
Complete the "Filter Information Page" and "Object Selection Page", selecting the same settings used in the original import to ensure that the same objects are reimported.
The Summary and Import page is displayed.
If the source contains new objects related to the object you are reimporting, the wizard requires that you import the new objects at the same time.
Click Advanced Import Options and make selections. (Optional)
Click Finish.
Oracle Warehouse Builder reconciles and creates objects. When this is complete, the Import Results dialog box displays.
The report lists the actions performed by Oracle Warehouse Builder for each object. For objects that have been reimported, the Actions column displays Synchronized. You can also expand an object to see which elements have changed. For example, you can see which columns of a table have changed since the last import.
Click Save to save the report. You should use a naming convention that is specific to the reimport.
Click OK to proceed or click Undo to undo all changes to your workspace.
The Advanced Import Options dialog box displays the options that you can configure while importing objects. This dialog box enables you to preserve any edits and additions made to the object definitions in the Oracle Warehouse Builder workspace.
By default, all options on this dialog box are selected. Deselect these options to have these objects replaced and not preserved.
For example, after importing tables or views for the first time, you manually add descriptions to the table or view definitions. To ensure that these descriptions are not overwritten while reimporting the table or view definitions, you must select the Preserve Existing Definitions option.
The contents of this dialog box depend on the type of objects being imported. For more information about the advanced import options for each type of objects, see the following sections:
Select these options to reconcile views or external tables:
Import descriptions: The descriptions of the view or external table are imported. Existing descriptions are not preserved.
Preserve workspace added columns: The columns you added to the object in the workspace are preserved.
Select these options to reconcile tables:
Preserve workspace added columns: To retain any columns added to the table in the workspace.
Preserve workspace added constraints: To preserve the constraints you added to the table in Oracle Warehouse Builder.
Import indexes: To specify additional details about how indexes should be imported. Importing indexes consists of the following options:
Preserve workspace added indexes: To retain any indexes added to the workspace table.
Import physical properties of indexes: To indicate how indexes should be imported. Select the Preserve workspace added physical properties of indexes option below this option to specify that any physical properties added to the indexes should be preserved.
Import index partitioning: To indicate how index partitions should be imported. Select the Preserve repository added index partitioning option to specify that any index partitions added to the workspace table must be preserved.
Import partitioning: To specify additional details about how partitions should be imported. Importing partitions contains the following options:
Preserve workspace added partitioning: To retain all partitions added to the workspace table.
Import physical properties of partitioning: Use this option to indicate how the physical properties of partitions should be imported. Select Preserve workspace added physical properties of partitioning to indicate that all physical properties of the partitions in the workspace table should be retained.
Import physical properties: To indicate how the physical properties of the table should be imported. Select the Preserve workspace added physical properties option to specify that all physical properties added to the workspace table must be preserved.
Import descriptions: To import the descriptions of the table.
Select these options to reconcile object types:
Import descriptions: To import the descriptions of the object type.
Preserve workspace added attributes: To retain the attributes added to the object type in the workspace.
The Edit Module dialog box enables you to edit the name, metadata location, and the data locations for a source module.
To update the database definitions of an Oracle module:
Right-click the module, and select Open.
The Edit Module dialog box displays.
To edit the metadata location, click the Metadata Location tab and specify the following:
Source Type: Identifies the location of the metadata. It can be either Oracle Data Dictionary or Oracle Designer Repository. Select Oracle Data Dictionary if the metadata is stored in the default workspace of the Oracle Database. Select Oracle Designer Repository if the metadata is stored in an Oracle Designer repository.
Location: Identifies the metadata location for the module. You can select a location from the list.
To edit the data location, click the Data Locations tab. By default, the location name specified while creating the module is selected. To change the location, you can either select from other existing locations or create a new location. To create a new location, click New. The Edit Oracle Database Location dialog box displays. Specify the details of the data location in the dialog box.
This chapter provides a generic description of importing metadata, which is identical for Oracle databases and other data source types. Follow these procedures when working with Oracle databases.
For information about importing metadata definitions from non-Oracle databases and other applications, see:
Chapter 3, " Using Flat Files as Sources or Targets" for importing metadata definitions from flat files and COBOL copybooks.
Chapter 4, "Connecting to Non-Oracle Data Sources Through Gateways" for connecting to and importing metadata from non-Oracle databases such as DB2 and SQL Server using Oracle Gateways.
Chapter 6, "Connecting to Data Sources Through JDBC" for connecting to non-Oracle databases such as DB2 and SQL Server using JDBC connectivity.
Chapter 8, "Integrating with Oracle ERP Applications" for details of importing metadata from Oracle applications including Oracle E-Business Suite, PeopleSoft, and Siebel applications.
Chapter 7, "Extracting Data from SAP Applications" for details of connecting to a SAP application and extracting data.
Chapter 9, "Importing Oracle Warehouse Builder Data into Business Intelligence Applications" for information about deriving business intelligence objects and deploying these objects into Oracle Business Intelligence Suite Enterprise Edition and Oracle BI Discoverer.
Chapter 10, "Importing Design Definitions from Oracle Designer" for information about importing design definitions from Oracle Designer applications.
Oracle Warehouse Builder provides an end-to-end business intelligence (BI) solution by enabling you to import, design, and deploy metadata from different sources into a data warehouse, and by making that data available to business analytical tools for decision making and business reporting. It fully integrates relational, dimensional, and business metadata and provides access to business analytical tools for decision making and business reporting.
Oracle Warehouse Builder contains BI objects that enable you to integrate seamlessly with BI applications to perform data analysis. You can define BI objects that enable you to store definitions of business metadata. You can then deploy these definitions to Oracle's BI tools, such as Oracle Business Intelligence Suite Enterprise Edition (Oracle BI Suite EE) and Oracle BI Discoverer, thereby extending the functionality of your data warehouse.
This section contains the following topics:
Business definitions are the equivalent of Discoverer End User Layer (EUL) objects. They are BI objects that enable you to integrate Oracle Warehouse Builder data with Oracle BI Discoverer. Business definitions facilitate data analysis of the data stored in a data warehouse. You can define and then deploy business definitions to Oracle BI Discoverer. You can either create new business definitions or derive them from existing schemas. For information about creating business definitions, see "Creating Oracle Discoverer Module". For information about deriving business definitions, see "Deriving BI Objects".
This section contains the following topics:
Before you derive business definitions to deploy to Discoverer, you must create an Oracle Discoverer module to store your business definitions.
To create an Oracle Discoverer module:
From the Projects Navigator, click to expand the Project node.
Expand the Business Intelligence node.
Right-click Oracle Discoverer and select New Oracle Discoverer.
Oracle Warehouse Builder opens the Create Module Wizard.
Follow the wizard steps by clicking Next.
In the Name and Description page, enter a name and an optional description for the Oracle Discoverer module. Also, indicate the type of module you are creating.
For more information about naming conventions, see Oracle Warehouse Builder Data Modeling, ETL, and Data Quality Guide.
On the Connection Information page, define the location to deploy the Oracle Discoverer module. For example, this may be the system where you are currently running Oracle BI Discoverer.
To use a deployment location you previously created, you can select it from the Location list. The connection information for this location displays on the wizard page.
You can also choose to create this location later and skip to the next page. You cannot deploy the Oracle Discoverer module unless you provide the connection information for the target location.
The wizard initially creates a default target location for the module you are creating. For example, if your module is named DISCOVERER_OBJECTS
, then the location is called DISCOVERER_OBJECTS_LOCATION1
. You can choose to provide the connection information for this location by clicking Edit. The Edit Oracle Discoverer Location dialog box is displayed. Provide the required information to connect with your target system and click OK. For more information about the Edit Oracle Discoverer Location dialog box, see "Defining Discoverer Locations".
A Discoverer location provides connection details of the system where you deploy the Oracle Discoverer modules. Oracle BI Discoverer EUL Release 10.1.2 or later should be installed on this system.
To define a Discoverer location, enter the following details on the Edit Oracle Discoverer Location dialog box:
Name: The name of the Discoverer location. Oracle Warehouse Builder assigns a default name for the location. You can edit this name.
Description: An optional description for the Discoverer location.
User Name: The name of the EUL owner to which you want to deploy your business definitions. You can also specify a user who has administrator privileges.
Password: The password for the user.
User password is required only for direct integration.
Connection Type: The type of connection used to connect to the Discoverer EUL. The options you can select are Host:Port:Service or SQL*Net Connection.
When you select SQL*Net Connection, specify the net service name in the Net Service Name field. When you select Host:Port:Service, specify the following additional details.
Host: The host name of the system on which the EUL exists.
Port: The default port number is 1521.
Service Name: The service name of the Oracle Database installation.
Integration Type: Direct or Indirect depending on the connection. Direct indicates that the deployment is made directly to the schema. Indirect provides file transfer options through file, FTP, HTTP, or HTTPS.
Depending on the mode of file transfer, you must provide the following details:
FILE
Root Path: Directory of the .eex
file.
File Name: The name of the .eex
file.
FTP
Host Name: The system credentials where the Oracle Discoverer server resides.
Host Login Port: Login port number, which is initially set to 0. You must change this according to your local configuration.
Transfer Format: Select from ASCII and IMAGE.
Host Login User: User name to run FTP.
Host Login Password: User password to run the FTP command.
File Name: The name of the .eex
file along with the complete path.
HTTP and HTTPS
Host Name: The system credentials where the Oracle Discoverer server resides.
Host Login Port: Login port number, which is initially set to 0. You must change this according to your local configuration.
Host Login User: User name for the HTTP/HTTPS command.
Host Login Password: User password for the HTTP/HTTPS command.
File Name: The name of the .eex
file along with the complete path.
Version: Represents the version of Discoverer to which the business definitions should be deployed. The list contains only one value, 10.1. Use this option to deploy to Oracle BI Discoverer 10g Release 2. This includes all Oracle BI Discoverer 10.1.x versions.
After you specify these details, click Test Connection to verify the connection.
In the Summary page, review the name and location information for the Oracle Discoverer module. Click Back to make any changes or click Finish to finish creating the Oracle Discoverer module.
After the Oracle Discoverer module is created, you can locate it under the Oracle Discoverer node on the Projects Navigator. Expand the module to see that Oracle Warehouse Builder provides a representation for the different objects types that comprise the Discoverer EUL. You can define the following types of Discoverer EUL objects:
Item Folders
Business Areas
Drill Paths
Lists of Values
Alternative Sort Orders
Drills to Detail
Registered Functions
Item Folders are equivalent to Folder objects in Oracle BI Discoverer that map to database tables, external tables, or views. They represent a result set of data, similar to a database view. Item Folders store information just like tables. For example, they are used to store details of employees or customers of an organization. An Item Folder contains entities called Items that correspond to columns in a table. Each item has a name and contains a specific type of information. For example, the Item Folder that contains details about employees may include items such as employee name, start date, and department.
There are two types of Item Folders: Simple and Complex. Simple Item Folders contain items that reference a single table in an Oracle module. Complex Item Folders, like database views, provide a method to group items from multiple Item Folders within the same Oracle Discoverer module. Item Folders also contain joins, calculated items, and conditions.
Note: Oracle Warehouse Builder does not support the Discoverer custom folders. |
Oracle Warehouse Builder creates Item Folders when you derive business definitions from warehouse design objects in your Oracle module, as described in "Deriving BI Objects". You can also manually create a customized Item Folder using the Create Item Folder Wizard or the Graphical Navigator. The Graphical Navigator can also be used to edit Item Folders.
The following sections contain more information related to Item Folders:
After you derive your design object definitions, an Item Folder is created as part of the derived business definitions.
Oracle Warehouse Builder provides the document editors that enable you to edit the name and description of an Item Folder, view its source design objects, edit the items it contains, and specify or edit any joins or conditions.
To edit an Item Folder:
From the Projects Navigator, expand the Oracle Discoverer module node, then expand the Item Folders node.
Right-click the Item Folder name and select Open. Or double-click the Item Folder name. This displays the Item Folder editors.
Click each of the editors to edit the Item Folder using the guidelines described in the subsequent sections.
The Name editor enables you to edit the name and description for the Item Folder.
The Source Items editor displays the available source items for your Item Folder.
When you are editing an existing item folder, the Selected column displays the source items that were selected at the time of creating the Item Folder. To select different items as the source, use the left arrow to return the items from the Selected column to the Available column. Then use the right arrow to move the new source item from the Available column to the Selected column.
Your selected objects can contain related items from multiple Item Folders.
To change the selected items, then use the left arrow to return the previously selected items. Now select an initial folder item from any of the available Item Folders within the same Oracle Discoverer module. You can then select additional folder items that have a relationship with the previously selected item. You cannot select items from unrelated Item Folders. The relationship between Item Folders are defined by the joins between them. To create a join between Item Folders, use the Joins editor to specify the relationships between the two Items Folders.
The Items editor displays the details and properties of all items in an Item Folder. You can view, create, and edit the following for an item:
Name: Represents the name of an item. To change the current item, double-click the name and retype the new name.
Description: Optionally enter a description for this item.
If you select an item name, the property inspector displays the following properties for that item:
Alignment: The default alignment used for this item in a Discoverer report.
Business Name: Business name of item.
Case Storage: Select the case storage method.
Content Type: Describes the content of multimedia data in this item when used in drilling. If the column contains file names, set this property to FILE. Else set it to the file extension (avi
,wav
,jpg
) to define the application that should process the data.
Created By: Created by.
Creation Time: Time of creation.
Database Column: Specifies the schema, table, and column based on which the item was created or derived.
Datatype: Select the data type for the item. All the data types are supported by Discoverer.
Default Aggregate: Indicate if the item defaults to an aggregate in the Discoverer report.
Default Position: Select the position of this Item on a Discoverer report.
Default Width: The default width of the item when it is displayed in a Discoverer report. The width is in characters.
Display Case: Select in what case the item information is displayed in a Discoverer report.
Format Mask: The format mask for this item when it is used in a work sheet.
Formula: You can provide a formula for any calculated items you want to specify. Click the Ellipsis button in this field to open the Formula dialog box. This dialog box contains a subset of the options in the Expression Builder. Use the Formula dialog box to create your calculation. This field is populated after you close the Formula dialog box. For more information about the Expression Builder, see Oracle Warehouse Builder Data Modeling, ETL, and Data Quality Guide.
Heading: The title for the item in a Discoverer report.
Item Class: Assign an Item Class that enables you to define properties for the item. The Item Class list contains Lists of Values, Alternative Sort Orders, and Drills to Detail. You can also remove a reference to an Item Class.
Last Update Time: Last updated time.
Max Char Fetched: The maximum amount of data that is fetched from LONG
, LONG RAW
, and BLOB
data types.
Replace NULL With: The value to use instead of the Item value if the value is NULL.
Updated By: Updated by.
Visible: Specifies whether the item is visible to a Discoverer user.
Word wrap: The default word wrap setting used for this item in a Discoverer report.
To add an item by using the Items editor:
Double-click the Item Folder in the Projects Navigator. The item folder editor is displayed. Click Items to open the Item Details section.
In the Item Details, add items by entering the names of the items.
Click Composition to open the composition editor.
The editor displays the item folder and the source object for the item folder. The editor associates an item with a column or another item.
For all the items that you added, map the appropriate element from the source object to the item on the item folder.
Joins enable you to associate data between two Item Folders. During data analysis, you may require information that resides in multiple folders. Joins enable users to perform business analysis and run reports across multiple Item Folders. After you create joins between Item Folders and deploy them to your Discoverer EUL, they are available for analysis in Discoverer Plus and Discoverer Viewer.
The Joins editor displays the relationships or joins between two Item Folders. You can define new joins by clicking on a new row and providing the required information. You can delete a join by right-clicking the box at the left of each join row that specifies the join's number and selecting Delete.
Figure 9-1 shows the contents of the Joins editor.
On the Joins page, click a row in the Join Name field. Provide the following information:
Join Name: Enter a name for the join you are creating.
Master Item Folder: Select the Item Folder that is the Master. In the above example, DEPARTMENTS is the local item folder and COUNTRIES is the master item folder. A join is created between these two item folders.
Detail always has Master: Select this to indicate if your detail Item Folder always have this master.
One to one: Select this to indicate a one-to-one relationship between the two Item Folders.
Outer join: Indicate from the list if there is an outer join in this relationship and its type.
Description: Optionally describe the join.
For each join, you can specify the Join Components by clicking in the field below and providing the following information:
Local Item: This list is populated with the items contained in the current Item Folder. Select an item from this list.
Operator: Select the relationship between the Local Item you selected and the Remote Item you select from the Master Item Folder.
Remote Item: Select an Item from your Master Item folder to join with the Local Item from your current Item Folder.
If you select a Join name, the property inspector displays the following values for the join:
Business Name: Business name of the Join.
Description: Description of the Join.
External Foreign Key: Specifies the external foreign key for the join.
Physical Name: Provide a physical name that is different from the default.
Also see "Adding Joins Using the Graphical Navigator" for an alternate way to add joins.
The Conditions editor enables you to define or edit a condition that restricts selection on the chosen Item Folder. Use this editor to provide or edit a condition. This editor contains the following:
Condition Name: The name of the condition.
Condition: Click the Ellipsis button in this field to display the Expression Builder. Use this to create or edit a condition. For more information about the Expression Builder, see Oracle Warehouse Builder Data Modeling, ETL, and Data Quality Guide.
Description: Optionally describe the condition.
Mandatory: Select this to specify if the condition is mandatory. A mandatory condition is always applied to filter data that is being retrieved for this item folder. Non-mandatory conditions can be switched on and off by the user.
Case Sensitive: Specifies whether the case should match for character data types.
The Composition editor enables you to view the components of an Item Folder. It displays the objects that contribute to the composition of this item folder. These are database objects for Simple Item Folders and contributing Item Folders for Complex Item Folders.
To add an item through the Composition editor:
Double-click the Item Folder in the Projects Navigator. The item folder editor is displayed. Click Composition.
The editor canvas displays the item folder and the source object from which the item folder was created. If no source object was selected while creating the item folder, then the canvas displays only the item folder.
Right-click anywhere on the canvas, and select Add, and then select the type of object (for example, Table, View, or External Table).
The Add a New or Existing Object dialog box is displayed. Select the object you want to reference and click OK.
The selected object is now visible on the canvas.
Drag the referenced element to an item in the item folder to create the composition for that item. For each column, an item is added in the item folder.
When you derive intelligence objects, Item Folders are created as part of the derived business definitions. However, to define a customized Item Folder, you can create an Item Folder using the Create Item Folder Wizard.
Item Folders are Discoverer objects and may be Simple or Complex. Each Item Folder contains items that you can delete or edit, as described in "Editing an Item Folder".
To create an Item Folder using the Create Item Folder Wizard:
Expand the Oracle Discoverer module in which you want to create an Item Folder.
Right-click Item Folders and select New Item Folder.
Oracle Warehouse Builder opens the Create Item Folder Wizard.
Follow the wizard steps by clicking Next.
In the Name and Description page, enter a name and optional description for the Item Folder.
Oracle Warehouse Builder distinguishes Simple Item Folders from Complex Item Folders in the same way as Discoverer. A Simple Item Folder is directly based on columns from a single table in an Oracle module and calculated items based on constants or items from that Item Folder. A C omplex Item Folder can contain items from multiple Item Folders within the same Oracle Discoverer module, and calculated items.
Select items for your Item Folder.
For a Simple Item Folder, you can select exactly one table, view, or external table from any module or user folder in the Oracle module, to be referenced by the Item Folder. Expand the selected object and proceed to select columns within the selected object, to your selected items. You can multi-select these referenced items by pressing the Ctrl key and using the right arrow to move them to the list of selected Items.
A Complex Item Folder can contain items from multiple Item Folders within the same Oracle Discoverer module. You can select the initial folder items from Item Folder A within an Oracle Discoverer module. You can then select additional folder items from another Item Folder B within the same module. However, the two Item Folders A and B must be related. You cannot select items from unrelated Item Folders. Thus, complex Item Folders combine multiple Item Folders that must be joined. You can define the joins using the Graphical Editor for an Item Folder. For more information about creating joins, see "Joins Editor".
For a Complex Item Folder, if there are multiple join paths between the item folders selected as the item sources, then the Join Selection page is displayed. The list on this page displays all the joins between the item folders. Select the join to be used for the Complex Item Folder being created.
In the Summary page, review the name and type of your Item Folder and items to be included in your Item Folder. Click Back to make any changes or click Finish to create the Item Folder.
You can locate the Item Folder on the Projects Navigator under the Item Folders node in the Oracle Discoverer module. This Item Folder contains all the selected items. You can edit the Item Folder properties, create joins and conditions, and edit item properties using the Graphical Editor, as described in "Editing an Item Folder".
After creating the Item Folder, you can use the following editors from the graphical editor:
For more information about how you specify the details on each editor, refer to the description of these editors in the "Editing an Item Folder" section.
An alternate way of creating item folders is to use the Graphical Navigator. You can use the editor menu or the editor canvas of the Graphical Navigator to create an item folder.
To create an item folder using the menu, click anywhere on the Graphical Navigator. The main menu on the toolbar changes dynamically. From the main menu, select Graph, Add, Oracle Discoverer, Item Folder. The Add a New or Existing Item Folder dialog box is displayed. Follow the steps listed in "Steps to Create an Item Folder".
To create an Item Folder using the canvas, drag and drop an Item Folder icon from the Component Palette onto the canvas. Or right-click a blank area on the canvas and from the shortcut menu, select Add, Oracle Discoverer, Item Folder. The Add a New or Existing Item Folder dialog box is displayed. Follow the steps listed in "Steps to Create an Item Folder".
Use the following steps to create an Item Folder:
Select the Create a New Item Folder option.
In the New Item Folder Name field, specify a name for the Item Folder.
In the Oracle Module list, select the name of the Oracle Discoverer module to which the Item Folder should belong.
Click OK.
The Item Folder is added to the editor canvas. Double-click the item folder to open the editors for the item folder. For more information about the contents of these editors, see "Editing an Item Folder" .
An alternate way to create a Join is to use the Graphical Navigator.
To add a Join:
Ensure that the item folder is available on the Graphical Navigator.
Right-click Joins, and select Add a Join.
The Add Join dialog box is displayed.
Specify a name for the join, and click OK.
The Joins editor completes the definition of the Join or use the graphical navigator for this.
Similarly, you can also drag an Item from the Items node to the Joins node to create a local item. You can also drag an Item to the Joins node of another Item folder to create a remote item.
Simple Item Folders are defined based on existing tables, views, or external tables. When the definition of the underlying object changes, you can update the Item Folder definition by synchronizing it with the object on which it is based.
To synchronize an Item Folder:
Expand the Item Folders node in the Projects Navigator.
Right-click the Item Folder and select Open.
The editors for the Item Folder are displayed.
Click the Composition editor to view the Item Folder.
On the canvas, right-click the Item Folder and select Synchronize.
The Synchronize Item Folder dialog box is displayed.
Review the details displayed on this dialog box and click OK.
Oracle Warehouse Builder synchronizes the item folder with the data object on which the item is based.
The Synchronize Item Folder dialog box enables you to update the Item Folder with any changes made to the data types used in the database object on which the Item Folder is based. This dialog box displays the details of the changes to be made to the Item Folder.
The Synchronize Item Folder dialog box contains three columns: Object, Reason, and Action. The Object column lists the component in the underlying database object that has changed. The Reason column displays a brief description of the reason for the synchronization. The Action column displays the action that is taken to synchronize the Item Folder. The available actions are Update and None. If you select None for a component, no synchronization is performed for that object. Only definitions that have an Action set to Update are synchronized.
For example, the Item Folder DEPT_ITMF
is derived from the DEPT
table. After the Item Folder is created, you modify the DEPT
table and change the data type of the column LOCATION
from VARCHAR2
to NUMBER
. When you synchronize the Item Folder DEPT_ITMF
, the Synchronize Item Folder dialog box displays LOCATION
in the Object column. The Reason column displays "Datatype mismatch". The Action column displays Update.
Click OK to perform the actions listed on the Synchronize Item Folder dialog box and update the Item Folder definition. If you do not want to perform the actions listed on this dialog box, click Cancel.
Oracle Warehouse Builder enables you to create a Business Area to deploy to a Discoverer EUL. Business Areas contain references to Item Folders stored in your Oracle Discoverer module and are used to group information about a common subject, for example, Sales Analysis, Human Resources, or Stock Control. The Discoverer users use these Business Areas as their starting point for building a query.
Business Areas only contain references to Item Folders and not the actual Item Folder definitions. Thus, a Business Area can contain a collection of unrelated Item Folders and the same Item Folder can appear in multiple Business Areas. It enables you to set up multiple Business Areas with different levels of detail, for example, Sales Analysis area containing one Item Folder, Sales Details area containing six Item Folders, and a Sales Transaction area with 30 Item Folders. When you delete an Item Folder, the reference to it from the Business Area is also deleted.
When you deploy a Business Area using the Control Center, the dependencies of the Business Area are not automatically deployed. For example, if a Business Area BUSN_AREA contains two Item Folders, IF1 and IF2, then when you deploy BUSN_AREA using the Control Center, IF1 and IF2 are not deployed.
You can create a Business Area using the Create Business Area Wizard or from the Graphical Navigator. You also use the editor to edit a business area.
To create a Business Area using the Create Business Area Wizard:
Expand an Oracle Discoverer module.
Right-click Business Areas and select New Business Area.
Oracle Warehouse Builder opens the Create Business Area Wizard.
Follow the wizard steps by clicking Next.
In the Name and Description page, enter a name and optional description for the Business Area.
In the Source page, all the Item Folders available within the Oracle Discoverer module are displayed. You can multi-select the Item Folders by pressing the Ctrl key and using the right arrow to move them to the list of Selected Item Folders.
In the summary page, review the Item Folders you selected. Click Back to make any changes or click Finish to finish creating the Business Area.
After the Business Area is created, you can locate it on the Projects Navigator under the Business Areas node with references to the selected Item Folders stored in it.
To make changes to your Business Area definitions after you create them, use the Edit Business Area dialog box. For details, see "Editing a Business Area".
Alternatively, from the Graphical Navigator you can use the main menu or the canvas to create a business area.
To create a business area using the menu, click anywhere on the Graphical Navigator. The main menu on the toolbar changes dynamically. From the main menu, select Graph, Add, Oracle Discoverer, Business Area. The Add a New or Existing Business Area dialog box is displayed. Select Create a new Business Area and specify the name of the business area and the module to which it belongs. Click OK. The newly created business area is available on the Project Navigator. Double-click the business area to open the editors for the business area. See "Editing a Business Area" for details of the editors.
To create a business area from the Graphical Navigator, right-click a blank area on the editor canvas and select Add, Oracle Discoverer, Business Area. The Add a New or Existing Business Area dialog box is displayed. Select Create a new Business Area and specify the name of the business area and the module to which it belongs. Click OK. The newly created business area is now available on the Project Navigator. Double-click the business area to open the editors for the business area. Using the Source editor, move item folders from the Available list to the Selected list. On the Contents editor, you can view existing item folders and add new ones to the business area. See "Editing a Business Area" for details of the editors.
Oracle Warehouse Builder enables you to edit the definitions for a Business Area using the Edit Business Area dialog box.
To edit a Business Area:
From the Projects Navigator, expand the Business Area node.
Right-click a Business Area name and select Open.
Oracle Warehouse Builder opens the Edit Business Area dialog box containing the following editors: Name, Source, and Contents:
The Name editor enables you to edit the name and description of a Business Area.
The source editor displays the source of those Item Folders that have been included in the Business Area. You can add new item folders to the Business Area or remove existing ones using this editor.
The contents editor enables you to add item folders to a Business Area. Right-click anywhere on the editor and select Add, Item Folder. The Add a New or Existing Item Folder dialog box is displayed. Follow the steps listed in "Steps to Create an Item Folder". You can also add an item folder by dragging and dropping the item folder from the Projects Navigator into the Contents editor. This creates a shortcut to the item folder. You can double-click the item folder to access it directly from the Contents editor.
Oracle Warehouse Builder enables you to create a Drill Path to deploy to a Discoverer EUL. Drill Paths define a hierarchy relationship between the items in your Oracle Discoverer module. For example, Region, Sub-region, Country, and State. Oracle Warehouse Builder creates these drill paths for derived dimensions. You can also create your own customized drill path definitions if you are familiar with your data.
To create a Drill Path:
Expand the Oracle Discoverer module.
Right-click Drill Paths and select New Drill Path.
Oracle Warehouse Builder opens the Create Drill Path Wizard.
Follow the wizard steps by clicking Next.
In the Name and Description page, enter a name and optional description for the Drill Path.
Use the Drill Levels page to define a drill level and specify the Item Folder it references. Optionally, you can provide a description for the Drill Levels. To define drill levels, click a row and provide the following information:
Drill Level: Enter a name for the drill level.
Item Folder: From the field, select the Item Folder it references.
Description: Provide an optional description for the drill level.
When you select a referencing Item Folder for the Drill Level, the wizard lists the available Items within that Item Folder under the Drill Level Items field at the bottom.
In this field, you can specify one or more items to act as drill items. Select the Use as Drill Item option for each Item you want to include as a drill item in the level.
Figure 9-2 displays the Drill Levels page of the Create Drill Path Wizard.
If there are multiple join paths between the Item Folders referenced by the drill levels, then the Join Selection page is displayed. The list displays the existing joins between the selected Item Folder. Select the join to use for the drill path.
In the summary page, review the drill levels you are creating. Click Back to make any changes or click Finish to create the drill path.
You can locate the drill path on the Projects Navigator under your Oracle Discoverer module. Oracle Warehouse Builder enables you to edit a drill path using the Edit Drill Path dialog box.
Oracle Warehouse Builder enables you to edit drill paths using the Edit Drill Path dialog box.
To edit a drill path:
From the Projects Navigator, expand the Drill Paths node.
Right-click the Drill Path and select Open.
Oracle Warehouse Builder displays the Name and Levels editors.
The Name editor enables you to edit the name and the description of the drill path.
Use the Levels editor to edit the drill levels that you defined. The Drill Levels section lists the drill levels along with the item folders that they reference. The Item Folder column displays the item folder that a drill path references. You can modify this by selecting the new item folder from the list.
The Drill Level Items section displays the items that act as drill items. You can modify this list by selecting more items that act as drill items.
You use the Structure panel to manipulate hierarchies. For example drill levels can be moved up in the same subtree, moved out of the current tree, or moved to the root
level. However, multiple roots for Discoverer modules are not enabled and subsequently fail validation. You can also remove a level. In this case, sub levels of deleted levels move up to the root
level.
In Discoverer, Lists of Values (LOVs) represents a set of valid values for an item. These are the values in the database column on which the item is based. LOVs enable end users to easily set conditions and parameter values for reports. An example of an LOV can be names of different countries that a user can pick from a list to view a report on the quantities of a product sold in four specific countries.
You can create lists of values for Item Folders using the Create List of Values Wizard as described below.
To create a List of Values:
Expand the Oracle Discoverer module.
Right-click Lists of Values and select New List of Values.
Oracle Warehouse Builder opens the Create List of Values Wizard.
Follow the wizard steps by clicking Next.
In the Name and Description page, enter a name and optional description for this list of values. Select the Set as Drill to Detail box if you also want to set this as a Drill to Detail. When you deploy these definitions to Discoverer, an Item Class that you can use both as a List of Values and as a Drill to Detail is created.
The Defining Items page enables you to select the item that generates your LOV in Discoverer. This page displays all the Items available in your Discoverer module. Expand the nodes to select an item and click Next.
The Referencing Item page enables you to associate your LOV with different items. The Available Items column displays all the Items available in your Discoverer module. Expand the nodes to select the items that references your list of values. Use the right arrow to move your selections to the Selected Items column and click Next.
In the summary page, review the defining and referencing items selected for the LOV. Click Back to make any changes or click Finish to finish creating the LOV.
You can locate the LOV on the Projects Navigator in the Oracle Discoverer module under the Lists of Values node. Oracle Warehouse Builder enables you to edit the name, description, and defining and referencing items associated with an LOV using the Edit List of Values dialog box.
Oracle Warehouse Builder enables you to edit a list of values using the Edit List of Values dialog box.
To edit a list of values:
From the Projects Navigator, expand the List of Values node.
Right-click the List of Values and select Open.
Oracle Warehouse Builder displays the Edit List of Values dialog box, where you can edit the following: Name, Defining Item, Referencing Items, and Options.
Use the Defining Item editor to edit the item that generates the list of values in Discoverer. The item that is the defining item is highlighted. To edit this and specify that another item is necessary to generate the LOV, select the new item.
Use the Referencing Items editor to edit the items that reference the list of values. The Selected column lists the items that the list of values references. To add more items to which the list of values references, select the item in the Available column and use the right arrow to move it to the Selected column. To remove items that the list of values currently references, select the item from the Selected column and use the left arrow to move it to the Available column.
Use the Advanced editor to specify advanced options for the list of values. The advanced options are as follows:
Retrieve Values in groups of: Use this option to specify the number of values that are retrieved in group. The default value is 100 which means that the values are retrieved in groups of 100.
Sort the values and remove duplicates: Select this option to remove duplicate values from the list of values and to order the values. This ensures that the LOV always shows unique, ordered values.
Show values in "Select Items" page of Worksheet Wizard: Select this option to enable users to expand the List of Values when selecting items to include in a query.
Require user to always search for values: Select this option to display the Search dialog box every time the List of Values is expanded.
Cache List of Values during each connection: Select this option to store the list of values when the List of Values is expanded for the first time. This improves performance because otherwise, every time the List of Values is expanded, the values are fetched from the database.
In Discoverer, alternate sorts enable end users to display values in a nonstandard sequence.For example, by default the values of the Description item are sorted alphabetically. To sort the description according to the values of the Product Key item, you must define an alternate sort item and link the two items. One item defines the sort order and the other defines the item to be sorted.
Define how you want to order the information in your Discoverer EUL using the Create Alternative Sort Order Wizard.
To create an Alternative Sort:
Expand the Oracle Discoverer module.
Right-click Alternative Sort Orders and select New Alternative Sort Order.
Oracle Warehouse Builder opens the Create Alternative Sort Order Wizard.
Follow the wizard steps by clicking Next.
In the Name and Description page, enter a name and optional description for the alternative sort order.
Select the Set as Drill to Detail box if you also want to set this as a Drill to Detail. When you deploy these definitions to Discoverer, an Item Class that can be used both as an Alternative Sort Order and as a Drill to Detail is created.