Rules Files From Basic To Advanced Glenn Schwartzberg
Rules Files From Basic To Advanced Glenn Schwartzberg
Glenn Schwartzberg ♠
About interRel
• 2008 & 2009 Oracle Titan Award winner - EPM Solution of the year
• 2008 Oracle EPM Excellence Award
• 2009 Oracle EPM/BI Innovation Award
• One of the fastest growing companies in the world
(Inc. Magazine, ’08 & ‘09)
• Two of the three Hyperion Oracle ACE Directors in the world
• Founding Hyperion Platinum Partner; now Oracle Certified Partner
• Focused exclusively on Oracle Hyperion EPM software
– Consulting
– Training
– Infrastructure and Installation
– Support
– Software sales
2
• 5 Hyperion Books Available:
– Essbase (7): Complete Guide
– Essbase System 9: Complete Guide
– Essbase System 9: End User Guide
– Smart View 11: End User Guide
– Essbase 11: Admin Guide
– eBooks available on Amazon Kindle
• Just out!
– Hyperion Planning for End Users
• Coming Soon
– Hyperion Planning for Admins (days now…)
– Hyperion Financial Management (Q1 2010)
• Overview
• Unique situations
Rules File Basics
• Can be used to build Dimensions and/or
Load Data
• Can use multiple types of input
– Text files
– Excel File
• Excel 2003 format and before as of V11.1.1.3
– Sql statements
– Error files from other load rules
• Rows starting with \\ are ignored
\\ Member Mfg_Ops_Supp Not Found In Database
EMEA,IE_CORP_USD,2010,9,3301,4320,100000,23063
• Remember to not use the same error file name
Rules File Basics (Continued)
• Basic ETL is possible
– Splitting fields
– Adding text
• Prefixes
• Suffixes
• Whole columns
– Replacing values
– Joining fields (additive or merging)
– Moving fields
– Null field can cause promotion for dimension
builds (if selected)
– Selection/Rejection or rows possible
Dimension Build Methods
• Common
– Generation
– Level
– Parent/Child (best for shared rollups)
• Uncommon
– As Child Of
– As sibling With Matching String
– As Sibling of Lowest Level
Common Examples
• Generation
– Top down
– Dimension is Gen 1
Level
Bottom up
Leaf is level 0
Parent/Child
Parent exists before
child is added
Additional
occurrences create
shared members
As Child Of
• Parent must already
exist
• Note - the heading
for the column is the
dimension name
• Good for rejections
and unclassified new
members
Sibling with Matching String
• Tries to match as best it can.
• Starting with left characters - Equal or greater than
• If no match adds to bottom of dimension
• Put in dimension name as field header
Example or Matching String
Before
After
Level
Shared Members
• Can’t move shared rollups with a single rule
– Two rules
•Specify remove unspecified in first rule
•Load a dummy file with a single row with first rule
•Next specify merge in second rule (or use first rule)
•Load complete hierarchy with second rule
– Load with same MaxL statement so you don’t lose data
Example
• Create a file with a single row
• Set Member Update to remove
unspecified
Example Page 2
Start Load Remove File
After
Example Page 3
• Load full reload file After
26
Load Data with MaxL – Multiple
Data Sources
• Using the load buffer during incremental data loads improves
performance
• Initialize the load buffer to accumulate the data
– alter database AsoSamp.Sample initialize load_buffer with
buffer_id 1;
• Read the data sources into the load buffer
– import database ASOSamp.Sample data from server
data_file 'file_1' to load_buffer with buffer_id 1 on error abort;
– import database ASOSamp.Sample data from server
data_file 'file_2' to load_buffer with buffer_id 1 on error abort;
– import database ASOSamp.Sample data from server
data_file 'file_3' to load_buffer with buffer_id 1 on error abort;
• Load data from the buffer into the database
– import database ASOSamp.Sample data from load_buffer
with buffer_id 1;
Load Data with MaxL
Multiple Data Sources
• Import statements do not need to be continuous
• As long as the buffer exists, the database is
locked from queries, aggregations and data
loads by other means
Concurrent Loads
• Multiple load buffers can exist on an ASO
database
• Load data simultaneously using multiple data
buffers
• Commit multiple data load buffers in the same
operation
– Faster than committing each buffer by itself
• Must use separate sessions in MaxL
29
Concurrent Data Loads
• MaxL Session 1
alter database AsoSamp.Sample
initialize load_buffer with buffer_id 1 resource_usage 0.5;
import database AsoSamp.Sample data
from data_file "dataload1.txt"
to load_buffer with buffer_id 1
on error abort;
• MaxL Session 2
alter database AsoSamp.Sample
initialize load_buffer with buffer_id 2 resource_usage 0.5;
import database AsoSamp.Sample data
from data_file "dataload2.txt"
to load_buffer with buffer_id 2
on error abort;
• When data fully loaded, one commit statement
import database AsoSamp.Sample data
from load_buffer with buffer_id 1, 2;
30
Slice Loading = Incremental Loads
• Enables “trickle feed” functionality
• Issue - Users perform retrievals when the
database was being loaded and ASO loads can
take a while
• Incremental loading creates subcubes or slices
along side the primary slice of the database
• Dynamic aggregations are performed across the
necessary slices to provide query results
• Different materialized views might exist within a
slice as compared to the primary slice of the
database 31
Incremental Data Loads
• Incremental data load time is proportional to the
size of the incremental data
• Options
– Merge all incremental slices into the main database
slice or
– Merge incremental slices into a single data slice,
leaving the main db slice unchanged
• Load data into multiple data load buffers at the
same time
32
Incremental Loads
33
Merging Slices
34
Partial Data Clear
• New feature in 11x
• Why?
– Need to clear and modify selected portions of the cube
– Refresh actuals but budget is static
• Physical clear completely removes cells
– Longer to clear
– Faster retrievals after aggregation
• Logical clear removes cells by creating compensating cells in a new
slice
– Faster to clear
35
• Unique situations
Blank Values
• By Default, Essbase will replace a blank value
with the prior row value (Not necessarily a good
thing)
• To replace with a default Value
– Add a text column with a unique value or phrase (I
like the Tilde “~”)
– Concatenate it with your column
– Replace ~ with the default Value selecting replace
whole word
– Replace ~ with nothing without checking Whole word
Blank Value Example
Flipping the sign on Data Loads
• Three ways (there are more)
– Use a UDA and specify it in the load rule
• I’ve been told it does not work on ASO
– Scale Column
– Keep Natural and use a formula to reverse
Rejection/Selection Criteria
• Select or reject rows based on criteria
• Uses And/or logic for a single column
• Field 2 = Jan or Feb or Mar
Global Selection/Rejection
• Across columns can be set for “And” or “Or”
logic
– Select if field 1 = Actual and Field 5 contains 2010
only selects where both conditions are true
– Reject if Field = Budget or Field 5 < 2010 rejects if
either is true
• Dimension building and data loading can be
set differently for global option
Sub Variables in Load Rules
• Where can they be used?
– As a column header
– As a data source for SQL
– Inside of SQL
• Even better
• Put everything in the select clause
– Note- no beginning “Select”, but one after
union
More Load Rule Tricks
• Using Header names as column headers
• Why?
• Use one load rule for different load files
• Simplifies process, less to code
Load Rule - LaodAll
Load Rule - LaodAll
Dynamically add DTS
gschwartzberg@interrel.com
http://glennschwartzbergs-essbase-blog.blogspot.com/