f908980500_schwartzberg_persentation2
TRANSCRIPT
Advanced Essbase Studio Tips and Tricks
Glenn Schwartzberg ♠
Agenda
• Data connections– Manual created tables– Warnings
• Mini-Schemas• Members(Metadata Elements)
– Modifying– Filtering– Sorting
• Hierarchies– Accounts– Alternate Rollups and Attribute dimensions
Agenda continued
• Essbase properties– Ordering members in the hierarchy– Why you don’t have data load SQL– Why you should create your own SQL– Attribute dimensions revisited– Issue with manually created members
• Alias Tables– Setting the default alias– Why I shouldn’t join columns in alias
Agenda continued
• Drill-Through– How to create– How to do drill-through on recursive hierarchies– How to fix Alias concatenation issues
• How Studio 11.1.2 is making our life easier so we don’t need to work around some problems.
How advanced are we?
• Have you– Never used Studio– Played with it a little– Use it in production– Should be teaching this session
Order of Processes
1. Create data source
2. Create mini-schema (similar to metamodel in EIS)
3. Set Member Properties
4. Create hierarchies
5. Create cube schema
6. Create Essbase model
7. Cube deployment
8. Create and associate Drill-through
Two Methods of Connecting
• Non-streaming– Essbase Studio requests Essbase to access the data
source during cube deployment and Essbase Server uses ODBC to query the data source
– Default mode– Faster performance
• Streaming– Essbase Studio accesses the data source directly
using JDBC
• Define the method in the server.properties file
Data Connections
• Can connect from an array of providers– Relational– OBIEE– EPMA– Flat Files
• Can connect to – Tables – Views– Aliases– Synonyms
Connections Continued
• Can also create User_Defined table– A logical view of one or more tables
• Why– When you don’t have access to tables or views from
relational source (Darn DBAs)– Need to change the data type for joins
Warnings
• Tables/Views – Can not be removed from a data source once added– Can’t add or remove columns– Can’t change data types
• We will talk about this later
Major Hack• Can delete manually created tables
– Not for the feint of heart– If anyone asks, I did not tell you how to do this!!!
• Always back up your repository FIRST• Open the table CP_Source.
– Find the Table Name in the column “Name”– Look at the ID_OID and owner_OID(write them down)– Delete the row
Major Hack - Continued
• Open the Table cp_sourcecomponent• Find the Source_OID = ID_OID and Owner_OID =
Owner_ID– Delete those rows
Must be done before you use any of the columns or you need to delete them from Minischemas, Hierachies, Aliases, Member definitions etc first.
Major Hack - Continued
• You can use this hack to also change where clauses or joins in your SQL (don’t delete)
• (Don’t add, delete or change columns)• Edit the column
– (Picture below is not to edit but to display)
Minischemas
• Can use introspection to create joins or do it manually
• Joins will only work if columns are the same data type (remember manually created tables)
• Can’t join flat files together but can do recursive joins on a file
• You don’t need a fact table• If you are using Drill-through, it is best to add the
table and joins here(but you don’t have to)
Metadata Elements
• Dimensional element– Logical representation of a physical source column– Text, measure, numeric, or date– Can be edited for specific logic or filters– Can apply sort order for the dimension element
• Other– Derived text measure– Date measure
• Use these metadata elements to build hierarchies
Manipulating Metadata Elements
• Can apply simple functions to elements– String Functions, Date functions, Math– “PR” || Substr(Connection:test,Product_ID,1,3)– We will talk about a potential problem with this later
• Can apply simple filters– ==, !=, <=, >, etc (Can’t use <>)
• connection : \'test'::'Test.dbo.PRODUCT'.'SKU' != "100-10" and connection : \'test'::'Test.dbo.PRODUCT'.'SKU' != "100-20“
– Note Strings use Double quotes
Filtering Metadata Elements
• Can sort based on multiple columns – Even if they are not in output
• Product name– Sort on Alias_name– Sort on Hierarchy_Name Ascending and sequence_ID
Descending
– For recursive, apply the sorts on the child member
Edit Metadata Element Example
Bindings
• Three Types– Same as Caption (Normal)– Advanced– Delayed
• Advanced– Changes the connection to a different column
• Caption
connection : \'tbcSource'::'TBC.PRODUCT'.'SKU’• Advanced binding
connection : \'tbcSource'::'tbc.product'.'PRODUCTID'
Delayed Binding
• Binding is done in the Hierarchy not the member– Waits until execution to resolve– Can pick up columns from folders
• class : \'tbcSource'\'family'\'FAMILY'.'caption' || "_" || class :\'DimElements'\'SKU_Delayed'.'caption'
Hierarchies
• Alternate rollups and Attributes– Both look the same in a Hierarchy– Attributes need to have the base member it
associates to as a child• Ounces
– Sku• Conversion from shared rollup to attribute occurs in Essbase
properties.
Which is an attribute and which is an alternate rollup?
Accounts hierarchies
• Can build multiple ways– Fact table columns
• Limited flexibility
– Secondary Standard dimension• Define as accounts in Essbase Schema• Allows you to use external columns as
– Consolidation– Time balance (and skip)– UDAs– Formulas– Solve Order– Storage type
Cube Schema
• The order the hierarchies are placed in the schema is the order they appear in the outline– If you manually change the order through EAS it will
stay unless you delete members or outline
• My recommendation – Use a single member as the “account” then have a
separate Standard Accounts hierarchy – Do not use built in Accounts Hierarchy
Essbase properties
• Why can’t I get dataload Sql– Joins are missing or incorrect– You have selected to use fact table columns and
confused Studio (doesn’t know what joins to remove)– Studio is stupid!
• Review your minischema to make sure joins are correct.
• Look at the properties and uncheck “optimize dataload by using fact table”
Why create your own SQL
• Reduces the number of joins– Depends on table design– Fact table can have needed columns
• Need multiple loads – Studio creates the load rule with the DB name as rule– Overwrites data load rule with subsequent loads.– See a problem– Create your own load rules
Attributes Revisited
• In Essbase properties you define the attribute dimensions– Look at the general tab– Select the attribute dimension under dimension– Can define slowly changing dimenison– If the attribute box does not show up, you have not
set the child base dimension level in the hierarchy.
Won’t show up unless child is included
Data load issue
• Certain data types and literals will not work in generated load rules causing the error
“Data Value encountered before all dimensions”
• How did I create it– Used a user created member in Hierarchy (Oracle DB)– Used a Nvarchar column (SQL Server)
• Generated SQL
Generated SQL
SELECT cp_104.........,
'MTD' AS "View",
'Actual' AS "Scenario",
.......
From cp_104…….
What I got
Fix
• Either in the custom SQL in the Essbase properties or Load rule change the code to:
SELECT cp_104.........,
Cast('MTD‘ as Varchar2(10)) AS "View",
Cast('Actual‘ as Varchar2(10)) AS "Scenario",
......
From cp_104…….• Note this is Oracle syntax similar for SQL Server
Alias Manager
• Best to do any manipulation in table or view• Can concatenate/substring, etc in aliases
– If you do it can cause problems with Drill-through
• Example:• connection : \'test'::'Admin.Account'.'Member' || "-" ||
'substr'( connection : \'test'::'Admin.Account'.'DESC', 1, 77 -
'length' ( connection : \'test'::'Admin.Account'.'Member' ) )
Drill-through
• Can drill through to:– Relational– URL– Java Procedure
• Uses $$Dimension_Column$$ and $$Dimension_Value$$ for substitutions within SQL
Odd Aliases
• Use custom SQL to specify alias or member in where clause
• Where (Member||”-”||Alias = $$Product_Value$$ and XXXXX)
Or (Member = $$Product_Value$$ and XXXXX)• This is why it is easier to do manipulation in
source!
Major hack #2
• Manual says you can not drill through on upper levels of recursive hierarchies– Can drill through on level 1 without much trouble– What about other levels?– You can if you use Oracle or SQL Server 2005
DO THIS AT YOUR OWN RISK!!!!!!
• Specify you want to Drill at the parent member and child member
• Add the columns you want (normal)• Edit the SQL (Create custom SQL)• Use Recursive syntax
Example:• You have the following Recursive Product table. • Child• Alias• Parent• Seq_ID
• The cube was built using Parent and Child for the Hierarchy
• Create a custom SQL– Using Oracle you could have a where clause that contains
• Where(cp_xxx.SKU in Drill_through table(select child Parent_Child_table ' start with child_name =
• $$Product_PC-VALUE$$ connect by prior child = parent))
What’s New in 11.1.2 Studio
40
Making our life better and easier through innovation.
Studio Server as Windows Service
Oracle Diagnostic Logging(ODL)
OCI and specific ODBC DSN support
Enhanced Studio Console Display
Continued Studio use during data
exploration
OBIEE Business Mapping Layer as
source
Multiple connection pools
supported allowing concurrent queries
Catalog
Export / Import
Refresh tables
dropped columns
change in column data type
Delete tables
Many changes to metadata element no
longer require recreation of Essbase
model
Text list support Dimension order support
Support for named gen and levs
Automatic placement of
stored members before shared
Cube deployment improvements
Drill through on recursive
hierarchies
Save deployment parameters and options as MaxL
More to come
• This presentation brushed the surface of Essbase Studio. There is a lot more to learn.
Questions?
[email protected]://glennschwartzbergs-essbase-blog.blogspot.com/