f908980500_schwartzberg_persentation2

41
Advanced Essbase Studio Tips and Tricks Glenn Schwartzberg

Upload: dbircs

Post on 04-Mar-2015

31 views

Category:

Documents


1 download

TRANSCRIPT

Page 1: F908980500_Schwartzberg_Persentation2

Advanced Essbase Studio Tips and Tricks

Glenn Schwartzberg ♠

Page 2: F908980500_Schwartzberg_Persentation2

Agenda

• Data connections– Manual created tables– Warnings

• Mini-Schemas• Members(Metadata Elements)

– Modifying– Filtering– Sorting

• Hierarchies– Accounts– Alternate Rollups and Attribute dimensions

Page 3: F908980500_Schwartzberg_Persentation2

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

Page 4: F908980500_Schwartzberg_Persentation2

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.

Page 5: F908980500_Schwartzberg_Persentation2

How advanced are we?

• Have you– Never used Studio– Played with it a little– Use it in production– Should be teaching this session

Page 6: F908980500_Schwartzberg_Persentation2

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

Page 7: F908980500_Schwartzberg_Persentation2

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

Page 8: F908980500_Schwartzberg_Persentation2

Data Connections

• Can connect from an array of providers– Relational– OBIEE– EPMA– Flat Files

• Can connect to – Tables – Views– Aliases– Synonyms

Page 9: F908980500_Schwartzberg_Persentation2

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

Page 10: F908980500_Schwartzberg_Persentation2
Page 11: F908980500_Schwartzberg_Persentation2

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

Page 12: F908980500_Schwartzberg_Persentation2

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

Page 13: F908980500_Schwartzberg_Persentation2

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.

Page 14: F908980500_Schwartzberg_Persentation2

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)

Page 15: F908980500_Schwartzberg_Persentation2

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)

Page 16: F908980500_Schwartzberg_Persentation2

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

Page 17: F908980500_Schwartzberg_Persentation2

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

Page 18: F908980500_Schwartzberg_Persentation2

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

Page 19: F908980500_Schwartzberg_Persentation2

Edit Metadata Element Example

Page 20: F908980500_Schwartzberg_Persentation2

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'

Page 21: F908980500_Schwartzberg_Persentation2

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'

Page 22: F908980500_Schwartzberg_Persentation2
Page 23: F908980500_Schwartzberg_Persentation2

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?

Page 24: F908980500_Schwartzberg_Persentation2

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

Page 25: F908980500_Schwartzberg_Persentation2

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

Page 26: F908980500_Schwartzberg_Persentation2

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”

Page 27: F908980500_Schwartzberg_Persentation2

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

Page 28: F908980500_Schwartzberg_Persentation2

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.

Page 29: F908980500_Schwartzberg_Persentation2

Won’t show up unless child is included

Page 30: F908980500_Schwartzberg_Persentation2

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

Page 31: F908980500_Schwartzberg_Persentation2

Generated SQL

SELECT cp_104.........,

'MTD' AS "View",

'Actual' AS "Scenario",

.......

From cp_104…….

Page 32: F908980500_Schwartzberg_Persentation2

What I got

Page 33: F908980500_Schwartzberg_Persentation2

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

Page 34: F908980500_Schwartzberg_Persentation2

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' ) )

Page 35: F908980500_Schwartzberg_Persentation2

Drill-through

• Can drill through to:– Relational– URL– Java Procedure

• Uses $$Dimension_Column$$ and $$Dimension_Value$$ for substitutions within SQL

Page 36: F908980500_Schwartzberg_Persentation2

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!

Page 37: F908980500_Schwartzberg_Persentation2

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

Page 38: F908980500_Schwartzberg_Persentation2

• 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

Page 39: F908980500_Schwartzberg_Persentation2

• 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))

Page 40: F908980500_Schwartzberg_Persentation2

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

Page 41: F908980500_Schwartzberg_Persentation2

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/