Saturday 19 November 2016

Loading flat file into Oracle using Oracle Data Integrator – Part 2. Creating the Logical Schema and the Data Store for File

In my previous blog, I had talked about creating a Physical Architecture and Physical Schema for a File in ODI(http://exploitsinhyperion.blogspot.in/2016/11/loading-flat-file-into-oracle-using.html ). In this blog, we will talk about creating a Logical Schema for the file and preparing a data store for this file.
To create a Logical Schema, expand the Logical Architecture as shown in the next snapshot.
Go to FILE and right click on this. Choose the New Logical Schema as shown in the below snapshot.
On choosing the “New Logical Schema” a window will pop up as shown in the below snapshot.

I enter the name of the Logical Schema and hit on the save button. This is shown in the above snapshot.

The Logical Architecture for File is with ODI_FirstFlatFile is shown in the below snapshot.

The next thing that we are doing to do is create a Model followed by a Data Store. To do this go to the Designer tab in ODI studio as shown in the next snapshot.
Since, I would be creating multiple models in ODI, I would want some logical grouping and structure. In order to do this, I create a new Model folder as shown in the next couple of snapshots.


Once the Data Model Folder is created, I right-click on the Folder and choose the create New Model button. This will open a New Model Configuration Pane as shown in the next snapshot.

The Model after updating the data is as shown in the above snapshot.

I right-click on the Model and click on the add new Data Store to create a data store that represents the file. This is shown in the next snapshot.
The new Data Store configuration window is as shown in the next snapshot.

In place of Resource Name in the above snapshot, I enter the name of the file that I want to load into the application.

The settings for the File is as shown in the next snapshot.

Observe that in the above snapshot, I have chosen the Record Separator to be Unix and the field separator to be Comma.
The Attributes tab will list the fields for the file. Since I don’t want to manually define any attributes, I click on the “Reverse Engineer” button in the below snapshots to get the list of fields from the files.


ON clicking OK, the attributes are auto populated as shown in the next snapshot.

Now, if I right click on the Data Store and hit the View Data button, I can see the data in the file as shown in the below snapshot.
This data is similar to what we have in the file at the location as shown in the next snapshot.
I now tag some meaningful names to my attributes as shown in the next snapshot.

In the next blog, I will talk about creating a Physical Schema for Oracle database in ODI.

No comments:

Post a Comment