Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
Abstract #236765 advanced essbase java api tips and tricks
1. Advanced Essbase Java API Tips and Tricks Tim Tow, Oracle ACE Director Founder and President Applied OLAP, Inc
2. About the Speaker Oracle ACE Director ODTUG Board of Directors Blogger Essbase Developer for 15 years Former CPA Founder and President, Applied OLAP, Inc Visionary and Development Lead, Dodeca Pilot, Rock Climber, Bike Commuter, Coffee Drinker Usually a nice guy…
3. Agenda Getting Started Writing Code Connections Member Information Grid API Building Software
4. Getting Started: Use a good IDE Can make a huge difference in productivity Free or Commercial? I use IntelliJ
6. Getting Started: Libraries There are many libraries/jars you can use What do you want your code to do? Client vs Web Utility functions – log4j, xml parsers Required Essbase jar ess_japi.jar Equivalent to the Essbase Runtime Client Optional Essbase jars – embedded mode ess_es_server.jar, cpld.jar, ojdl.jar Jars change with Essbase versions
7. Getting Started: Libraries Organization Client applications ib directory Web applications EB-INFib Jars distributed with your application ib Other jars used for coding J2ee.jar Obfuscation jars Etc.
8. Getting Started: Understand the Problem Huge disconnect Finance / IT speak different languages If necessary, get an interpreter Comprenez-vous? Don’t become a PICNIC Problem In Chair Not In Computer
9. Writing Code: Understand the Task Sequence Programs are extremely detailed, step-by-step instructions to the computer to automate one or more tasks How do you determine the steps? Observe the operation performed manually
11. Writing Code: Understand the Task Sequence Programs are extremely detailed, step-by-step instructions to the computer to automate one or more tasks How do you determine the steps? Observe the operation performed manually Use documentation
13. Writing Code: Understand the Task Sequence Programs are extremely detailed, step-by-step instructions to the computer to automate one or more tasks How do you determine the steps? Observe the operation performed manually Use documentation Use the Java API samples C:racleiddlewarePMSystem11R1ommonssbaseJavaAPI1.1.2.0amplesapi
15. Writing Code: Understand the Object Model Essbase object model Typically the objects you already know With a funny Java naming convention Some exceptions to this rule Ex. Cubeview Essbase object model Class Hierarchy Natural for Essbase users – ex. server / app / database Interface driven Provides consistency for the API consumer Provides implementational freedom for the provider Ex. EssOlapServer implements IEssOlapServer
16. Writing Code: Understand the Object Model IEssOlapServer IEssApplication IEssCube IEssDimension IEssCubeOutline IEssMember
17. Writing Code: Understand the Object Model IEssGridView (underlying multidimensional array of Essbase data and metadata) IEssCubeView (parent of Essbase operations) IEssMemberCell IEssDataCell
18. Connections: Embedded mode vs 3-tier mode? When should you use embedded mode? If you know the exact server/app/cube When you don’t want to have APS in your stack You want the absolute fastest performance When should you use 3-tier mode? Users don’t have TCP/IP access to the server When you need to use load balancing / clustering Clusters are defined in APS Load balancing / fail-safe rollover is not implemented in the JAPI Smart View implements clustering in it’s provider
19. Connections: Configuration essbase.properties Limit rows/columns in the retrieve Default used to be 5000 rows/256 columns May be smaller in 11.1.2.1 Embedded mode In CLASSPATH 3-tier mode Configured in EAS
20. Connections: Cube or Cubeview? IEssbase.IEssDomain.IEssCubeViewvsIEssbase.IEssOlapServer.EssOlapApplication.IEssCube Depends on what you want to do IEssCubeView can access the parent IEssCube Not a complete object My recommendation IEssbase.IEssOlapServer.EssOlapApplication.IEssCube Full access to the IEssCube object
21. Connections: Clean up after yourself Use try/catch/finally blocks Handle or log Exceptions Release resources Close connections Logoff the server Pay special attention to MemberSelection objects Failing to close these will cause disconnect efforts to fail silently 11.1.2.1 – new (and proper) limits on concurrent requests within the same JAPI session
22. Member Information: General Many ways to get member information Unnecessarily complex Probably due to the timing of functionality additions in the early years C/VB Outline API introduced after the main APIs Did not want to break compatibility with earlier versions Now we all pay Developers must think too much about *how* they approach obtaining member information due to Availability Dependability Performance
23. Member Information: General Two general ways to get member info IEssMember object Obtained a number of ways IEssCube.getMember() IEssCube.findMember() IEssCubeOutline.findMember() IEssCubeOutline.findMembers() IEssCubeOutline.executeQuery() IEssMemberSelection.executeQuery() Member Strings IEssCube.queryDatabaseMembers()
24. Member Information: IEssMember Pros Object-based approach Convenient getter/setters for properties Cursoring available Cons May be a partial object w/no way for the developer to know which properties are available Use Cases Building / editing / documenting outlines Certain reporting situations
26. Member Information:Member Strings Pros Extremely Fast Cons You must write the query to return, then parse the string returned, to get the properties you need Not all properties are available Documentation is poor Not all available properties are documented Look at docs for EssQueryDatabaseMembers Use Cases Reporting / user member selectors
29. Grid API: Fast Data Access Same API used by the classic Excel add-in WWEAD? Same query by example requirements Single retrieve per IEssGridView All dimensions must be represented At least one dimension in row orientation No extraneous text that is also a member name Member out-of-place errors Numeric member names prefixed with a quote Unless you set the cell type
30.
31. Grid API: Arrays of Information! Cell values What you ‘see’ in Excel Cell types Member / data / text (plus member w/key) Attributes Information used by Excel ‘Styles’ Ex. – Actual in Sample/Basic = 536870928 or 100000000000000000000000010000 in binary I believe this bit indicates the member is configured to Store Data
32. Grid API: Arrays of Information! Formatted values Must set IEssCubeView.isFormattedValues() Works for Numbers with formatting specified for the member SmartLists (a/k/a text measures) Date measures SmartList names SmartList associated with a member cell
34. Building Software: Use Source Code Control Provides centralized source code management Facilitates coordination within dev teams Ensures code changes are integrated properly Tracks code history Provides tools for version comparison
36. Building Software: Automate Your Build Scripts Reliable software is about consistency Build scripts bring consistency Builds use the exact same steps every time Common Build Tools Use XML defined steps Do much more than just compile source code Pull from source code control Compile Test Package for distribution
37. Building Software: Automate Your Build Scripts Most popular build tools We use Ant Dodeca / OpenOffice Add-in / OlapUnderground Different development / production scripts Target multiple versions of Essbase
40. Building Software: Use Robust Logging Helps you find issues Dev Production Log4j Configurable logging Level TRACE / DEBUG / INFO / WARN / ERROR / FATAL Output Console / File / Rolling File Pattern
41. Common uses Error logging Performance logging Building Software: Use Robust Logging