Loading Data into Essbase [ 120 ] Make your data Essbase-friendly The reason this subject is something worth discussing here in Essbase is because unlike traditional relational database packages, Oracle Essbase includes many easy to use tools to quickly transform, alter, modify, or otherwise turn questionable data into good, usable data that can be fully and correctly loaded into your Essbase database. Creating Essbase-friendly data can be accomplished with a minimum amount of effort and expense, both on the Essbase side and the data source side, which is sure to please even the toughest business customer who no doubt is aware of how creating an extract of data from a traditional system sometimes means a lot of effort and even the writing of a complex program or two. First, to make sure you understand, when loading data in Essbase the data must contain a representative element of data for each dimension in the target Essbase database's outline. For example, our Esscar database outline contains seven dimensions, so the data you intend to load must contain an element for each dimension plus the data value itself, for a total of eight elements of data. The following gure shows you how your data would look in a perfect world: Notice there are eight columns of data, one column for each dimension in the Esscar database outline and the data value itself. Now, as mentioned, this would be the perfect way to receive data from an outside source. It's too bad this is rarely the case when receiving data from another department or business activity, even within your own company. Heck, sometimes data from within the same company is the most inconsistent. In the real world, you are lucky when you get the bare minimum of the data elements you need to satisfy your Essbase requirements from sources external to your Essbase database. This is not a great concern most of the time with Essbase and we'll tell you why, then we will take the rest of this chapter to show you how. Essbase-friendly thoughts Consider that you have constructed your Essbase database outline to be as exible and detailed as possible for your business customer. You know very well that you won't always get clean data from an external system that will load right into your database. 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 Chapter 4 [ 121 ] There are many reasons why you may not get data sent to you just the way you would like it. First and foremost is the expense of writing a complex program to extract the data from one system and pretty it up for the receiving system. Second, it takes time to write such a program. With Essbase, you have tools designed specically to pretty up or make Essbase-friendly, even some of the most objectionable data. In other words, with the tools that Essbase provides you and a little bit of your own creativity, there isn't much data out there that you would have a good reason to say no to making Essbase-friendly. Here is a real world example of making your data Essbase-friendly that shows just what can be accomplished with very little effort. The data load rule you are about to see was developed in less than two hours. Essbase-friendly example The following screenshot shows an input data le that has been opened in the Essbase Data Prep Editor. The upper pane displays the data in its raw form and the lower pane shows you what the data will look like to Essbase during the actual data load. The rst column in the raw data view is the month column in numeric format. The second column in the raw data view is the calendar year in four digit format. Unfortunately, our month/year values in the database outline are formatted as MMM YYYY (for example, Jan 2009), with the month as a three character abbreviation then a space then the four digit year. You will also need them all in one column. 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 Loading Data into Essbase [ 122 ] Next we join the month and year columns using the column join option in the Data Source Properties screen as shown: Observe how we told Essbase to join columns 1 and 2 into a new single column. But wait, the date format is still wrong. What do we do next? Easy enough, all we need to do now is set up the replace function to convert the date column into an Essbase-friendly date format. Watch how easy it is: 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 Chapter 4 [ 123 ] Notice in the Field Properties screen how we replace the wrongly formatted date column with the correct format. There are other options as well depending on your specic needs. Finally, looking at the data in the rst column, we see that what were once two separate columns with the wrong date format is now one column of correctly formatted data which will successfully load into our Esscar database. Total development time for this column was about 15 minutes. This is how you make your data Essbase-friendly! Types of data sources A typical data source for your Essbase database can contain many bits of information. Unlike traditional relational databases, Essbase data sources can be actual data values or they can be metadata. Because you can update your database outline dynamically with the same data that you ultimately load, data sources in Essbase take on a completely different meaning than in other types of systems. When talking about data sources in Essbase, any of the following can be considered. Type of data The data loaded into Essbase can be of two types, one is to load the data into the cube and the other is to update the outline of the cube: • Data loads: These are the actual data values. This would be the numeric value of one of the existing measures in the database. This type of Essbase data source is usually the only usable type of data source in a traditional relational database. 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 Loading Data into Essbase [ 124 ] • Dimension build loads: Information in the data that can actually be used to update the outline's member names, member aliases, member attributes, and more. The Essbase data rules le can be used both as a data load rules le, to load data values into the database and also as a dimension build rules le, to update or add new members to the database outline. Types of les used for data loads The data that is loaded into Essbase can come from different types of les like Microsoft Excel les, Text les, Comma Separated les or directly from a relational database. Let us talk about these le types and see how we can use each of them in Essbase. Microsoft Excel les Microsoft Excel les can be used as data sources in a couple of ways. First, they can be used to perform a "Lock and Send" of the data from the Microsoft Excel worksheet directly into the Essbase database. A Microsoft Excel workbook can also be used as an attached le or Linked Reporting Object (LRO). Text les There are two types of text les: • Delimited text les: Delimited text les are les that use a certain character, typically a comma or a semi-colon to delimit the data elds. This delimiter is used by the Essbase load rule to determine where one data eld ends and another data eld begins. Also, not all rows will be of the same length. • Fixed column width text les: The xed width type of text le has all rows of data the exact same length. Also, all of the data elds are the same length and in the same position and do not vary from row to row. Essbase data export text les One type of data source that loads without any intervention, in the form of data manipulation, or even without the aid of an Essbase data load rule is the Essbase database export text le. Essbase offers you the option of exporting the data from your database into text les (some do this for database backup purposes). When loading an Essbase exported le into an Essbase database with a similar outline, Essbase can automatically interpret the data elds and determine how to correctly load the data. This process is used in a database performance enhancing tip, which we will talk about later in this book. 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 . into Essbase [ 120 ] Make your data Essbase- friendly The reason this subject is something worth discussing here in Essbase is because unlike traditional relational database packages, Oracle Essbase. and correctly loaded into your Essbase database. Creating Essbase- friendly data can be accomplished with a minimum amount of effort and expense, both on the Essbase side and the data source. elements you need to satisfy your Essbase requirements from sources external to your Essbase database. This is not a great concern most of the time with Essbase and we'll tell you why,