In the very next step, we will see how to validate the data load rule file.. Step 9: Validating the data load rules file In this step, we will validate the correctness of the definition
Trang 1Repeat the steps above for all of the fields contained in the data source for which you are creating the data load rule, until all of the fields are defined to Essbase
Now that you have updated the property settings on all of the fields, it would be a
good idea to validate all of the field definitions and properties against your database outline In the very next step, we will see how to validate the data load rule file
Step 9: Validating the data load rules file
In this step, we will validate the correctness of the definition that you have provided
to the rule file Please make sure you validate after making changes to the rule file
If there is any error, you will get errors while loading the data
To validate the data load rules file:
1 In EAS, open the Data Prep Editor.
2 Click on the Validate button (last button on the Data Prep Editor window),
or you can click on Options and then click on Validate.
3 You should see a message, The rules file is correct for data loading, as
shown here:
Trang 2[ 146 ]
4 Let us actually remove the field definition for the Field6 (go to Field, then
Properties, then to Field 6 and remove the Field name) and now click on
the Validate button You should see an error message stating Field6 is
not defined as shown here:
Step 10: Saving the data load rules file
Now that you have validated the data load rules file, and there are no errors, you
can save the rules file Remember to use the proper Essbase 8 character naming
convention while saving the rules file You can save the rules file in your local file
system or on the Essbase server using the Essbase file system We prefer to save
all of the files on the Essbase server The rule files will be saved with the rul file
extension in Application|Database directory on the Essbase server
Whatever place you choose to save your data load rules files, always try to be consistent to make things easier Consistently saving files in the same location, or consistently naming Essbase database objects, only makes sense and provides easier and less costly support
To save the data load rules file with the Essbase default extension of rul:
1 In EAS, open the Data Prep Editor.
2 Click on File | Save button to save the file.
This material is copyright and is licensed for the sole use by Paul Corcorran on 5th July 2009
8601 ave p #1, , lubbock, , 79423
Download at Boykma.Com
Trang 3Loading data into your database
In the steps above, you learned how to create an Essbase data load rule Now let
us learn how to use this data load rules file to actually load data into your Essbase
database As with the Dimension Build, there are several ways to load data into
an Essbase database
A few of the ways you can load data into an Essbase cube:
• Using the EAS Outline Editor
• Using EssCmd or MaxL script commands
• Using your own API calls
In the next few sections, let us discuss how you can achieve it using the EAS
and MaxL statements
Using the EAS to load data into your
Essbase cube
Using EAS is the manual way of loading data into the cube This method will
probably look very familiar because it is almost identical to the Import Data step
of the Export/Import Data process, which we discussed earlier in this chapter
To load data into an Essbase database, using EAS:
1 Navigate to your Application|Database.
2 Then click on Actions | Load Data for "ESSCAR".
3 The Data Load screen will be opened as shown here:
Trang 4[ 148 ]
The different fields present on the previous screenshot are:
• Data Source Type: There are two types of data sources: Data File and SQL
If you have a comma or tab delimited data source file, you need to select
Data File If you are connecting to a relational database to use SQL
statements, you need to select SQL We will be selecting SQL as we will
be loading the data from a relational database data source
• Mode: There are three options in mode: Load only, Build only, or Both Here,
you need to mention what you are going to do with this data source Whether
it is used to load data only, update the database outline only, or used for both database outline updates and data loads Occasionally, as per our business
requirement, if a new member value arrives in the data file and does not
already exist in the Essbase database outline, you can specify Essbase to update the outline with the new member value and then perform the data load See
how smart Essbase is! This scenario can be achieved by selecting Both In the
Esscar cube we want to load only the data, so we select Load only.
• Data Source (Data File): If you are using a data file instead of a relational
database data source, you may need to specify the location of the data source
file The data source file can be on your Local System or on the Essbase Server
To select a data file, click on the button Find Data File and follow the prompts.
Faster data loading
In case of extremely large data files, if possible, deliver the data file
to the Essbase server so the data load will process faster, since you will eliminate the network response time from the load process
• Rules File: If you have chosen the SQL option you must select a rules file
name, as your SQL is embedded in the data load rules file To select the data
load rules file, click on the button Find Rules File and select the appropriate
data load rules file
• Abort on Error: If this box is checked, the data load will abort on any data
load error This is not always the best choice because, depending on where
the error is in the data, you may end up with a partial load
• Error File: This allows you to specify the error file location Remember,
there should not be any spaces in the path of the error file
• Overwrite: When the checkbox is selected, the data load process will
overwrite the existing error file if any If the named error file does not
already exist, Essbase will create a new error file
This material is copyright and is licensed for the sole use by Paul Corcorran on 5th July 2009
8601 ave p #1, , lubbock, , 79423
Download at Boykma.Com
Trang 5• SQL Username and Password: Here, you need to enter a valid username
and password for the relational database you will be connecting to Since
we are using a relational database in this example, we need to provide a
valid username and password
• Insert: This button in the data load form inserts another line so you can
define one more set of data load rules This allows you certain flexibility as
it is sometimes necessary to load the same data source more than one time
to get the desired load results
• Delete: This button in the data load form deletes the line that you have
selected Remember, once you click on the Delete button, it will not prompt
you for confirmation, it will delete the line Use carefully!
• Save: It will save information you have for future use The file will be saved
in the standard XML format
• Open: It will open the existing XML file.
• Execute in background: If this checkbox is selected, the data load will
execute in the background and you can perform other tasks in EAS
• OK: Once you click on the OK button, the data load will commence using
data load rules file you selected The data will be loaded into the Essbase
cube If there are any errors loading the data, a warning message is displayed
in the Data Load pane that states the data was only partially loaded into your
Essbase database The error log you have defined will contain information on any rejected data values
After you click on the OK button, the Data Load Results window will be opened
as shown here: