Wednesday, 14 December 2016

DATAEXPORT – Using environment variables for setting your substitution variables and automating your data exports

In this blog, I would be talking about using environment variables for setting substitution variables and automating your data exports. Well, this is more from the application maintenance perspective. Automating data backups and LCM backups is like a value addition since it basically shows foresight in preparing for that one day when all things go south… Now a couple of disclaimers. The example shown here has been done on a Linux box which is my personal favorite. I like Linux because of the vast array of commands and utilities that it offers at your disposal. The same can be done in windows batch script as well but it is a bit tedious, that’s all… Also, it assumes that you have a fair bit of knowledge about shell scripting…

So let’s begin…

In this blog, we would be creating a timestamped data export file… I personally like timestamped export file since the chances of two processes generating the same timestamp is a quite rare… And when you consider automated processes that generate the timestamps for you, it is very well impossible that you will generate the same timestamp entry on multiple runs.

The below snapshot shows me creating a variable called sibin (pardon me for lack of imagination) and setting its value using the export command.
A little write up about the export command. Generally, most of the operating systems have something called as scope of variables. Thus if I have a process P running which defines a variable say VAR, the scope of VAR is limited to only process P. Suppose that during the run of the process P, it creates a child process called Q, by default, Q will not get access to the variable VAR since it is out of scope. This is basically a security mechanism in play. However, we would want to share variables across to child processes. In this case, we use the export command. If I say export VAR=<VAR VALUE>, process P and Q can now access VAR.

To put things in Hyperion perspective, P is your shell script that calls the startMaxl.sh and startMaxl.sh is now your process Q. VAR can be the timestamp entry generated by process P for use by Q.

The below snapshot shows me getting a timestamp entry for the system date.
I now create a substitution variable called REVENUE_DATA_EXPORT which will have the file name of the export that I want to run. The below snapshots show me creating this substitution variable.


The next snapshot shows a sample shell script that I have created for my environment.

The next snippet shows the MAXL script created by me for setting the substitution variable.
On running the shell script, the MAXL executes successfully as shown in the below snapshot.
Observe that in the above snapshot, I have set the variable to be equal to the timestamp entry. I update this to be equal to the value of the FILENAME from the shell script.

I now create a calculation script to export the database from the REVENUE application as shown in the below snapshot. I am basically going to the level 0 of the data and exporting it out. However, in place of a file name, I am using the substitution variable REVENUE_DATA_EXPORT as the filename for the target export.
Observe the message panel in the above snapshot. Initially, the script verification failed giving me an error as follows: -
Error: 1012004 Invalid member name [03_12_16_095850.txt]

This was funny since somehow the Essbase calculation script was somehow trimming my variable name.
The below snapshot shows the variable being set by the MAXL script.
But, its actually an interesting error and the fix was quite simple. I had set my variable name as “REVENUE_DATA_EXPORT-03_12_16_095850.txt”. Now observe that between the name of the file and the timestamp I had put a minus sign. Now, a calculation script is similar in syntax and semantics to any programming language like Java or HTML. Now, the specialty of any language is that to identify tokens we make use of delimiters. English uses a full stop, comma, etc. and our beloved calculation script treats +,-,*,/ as delimiters. This – was causing the filename to be split into two parts. I replaced it with an underscore and the script worked perfectly.

Now from a design perspective, it means that the script can behave in different ways based on what value you set. In some cases, it would work while in some it may not. This is unpredictable. So should be used after examining all the pros and cons. The second thing is that I personally do not like spaces in file names since the spaces need to be escaped when doing further manipulation.

The below snapshot shows the updated variable setting where I am using underscore.
The calculation script validates successfully as shown in the below snapshot.
The below couple of snapshots shows me running the script after like a few seconds interval.


I observed that there was no data in the application and so I loaded some numbers in the application. Now I check the app folder for the files of the data export which is as shown in the below snapshot.
A simple cat of the file is as shown in the below snapshot.
Now, if you schedule the script on a nightly basis, you have an automated backup of the level 0 data in Essbase all done by the script. If you fancy scripting a bit more, you can do all the magic like moving it to a folder, compressing it and all…

DRM Error while accessing the web client – HTTP Error 404.17 Not found : The request matched a wildcard mime map. The request is mapped to the static file handler

In this blog, I would be talking about a strange error that I encountered while doing a DRM configuration on my machine. Now as you know DRM can only be installed on a Windows machine. Now the install went ahead successfully and I thought all the checks had been done. I checked that .NET frameworks are enabled.
However, when I tried to access the DRM web page, I got a strange error as shown in the below snapshot.
The error was something of this sort: -
HTTP Error 404.17 Not found: The request matched a wildcard mime map. The request is mapped to the static file handler.

Now, I checked all the files and everything and it all looked to be up and running. However, the issue was that I had not enabled a field in the Windows Communication Foundation Services.

This is a snapshot of the WCF services in my machine.
Observe that the HTTP activation is unchecked. Also observe that WCF services is checked. This is because TCP Port Sharing is clicked. I was thinking that if a component is marked as selected, it means that all the components underneath it should be selected. This is how logically it should work and the Hyperion Shared Services works this way, so I thought Microsoft works the same way. However, in Microsoft services, even if one service is selected, then ancestors all get marked. According to me this a design flaw.

Once I enabled the HTTP activation, I was able to access the DRM web page client as shown in the below snapshot.

Saturday, 10 December 2016

Tables created relational schema when a Planning application is created – Groundwork for messing with Hyperion Planning system tables

In this blog, I would be talking about what happens in a relational schema when we create a Hyperion Planning application. This would lay the ground work for us since I will be covering things like how text values are stored in Hyperion Planning and how to update them manually and where the application metadata resides and so on in my later blogs…
The below snapshot shows me creating a data source for my planning application.

I now run a select query to see the list of all tables that are present in the HYP_PLAN_APP1 schema. The output of this query is as shown in the below snapshot.

Observe that there are no tables at the moment present in this schema.
The next couple of snapshots show me creating a Hyperion Planning application using HYP_PLAN_APP1 as a data source.

Once the application has been created successfully, I again run a query on the HYP_PLAN_APP1 schema to list out the count of the number of tables that are present in the schema. This is shown in the below snapshot.
There are some 142 tables that have been created when the Planning application was created.
The sample list of table names that has been created is as shown in the below snapshot.
As an anecdote, we once created two Planning applications that pointed to the same relational schema and things got interesting in that we manually had to delete the schemas and create the applications from start.

The entire list of tables that are created is as shown below: -
  • HSP_OBJECT
  • HSP_UNIQUE_NAMES
  • HSP_OBJECT_TYPE
  • HSP_PLAN_TYPE
  • HSP_PENDING_XACTS
  • HSP_PENDING_DELS
  • HSP_DIMENSION
  • HSP_CURRENCY
  • HSP_SYSTEMCFG
  • HSP_ENUMERATION
  • HSP_MEMBER
  • HSP_ALIAS
  • HSP_ATTRIBUTE_DIM
  • HSP_ATTRIBUTE_MEMBER
  • HSP_MEMBER_TO_ATTRIBUTE
  • HSP_TIME_PERIOD
  • HSP_CALENDAR
  • HSP_USERS
  • HSP_GROUP
  • HSP_USERSINGROUP
  • HSP_ACCESS_CONTROL
  • HSP_USER_PREFS
  • HSP_LOCK
  • HSP_ACCOUNT
  • HSP_ENTITY
  • HSP_FX_TABLE
  • HSP_FX_RATES
  • HSP_FX_RATE_VALUES
  • HSP_SCENARIO
  • HSP_VERSION
  • HSP_CUBES
  • HSP_ACCOUNT_DESC
  • HSP_STRINGS
  • HSP_FORM
  • HSP_FORM_LAYOUT
  • HSP_FORMOBJ_DEF
  • HSP_FORMOBJ_DEF_MBR
  • HSP_FORM_CALCS
  • HSP_PLANNING_UNIT
  • HSP_PLANNING_UNIT_LOG
  • HSP_ANNOTATION
  • HSP_ACTION
  • HSP_PM_STATES
  • HSP_PM_ACTIONS
  • HSP_PM_EFFECTS
  • HSP_PM_RULE_LIST
  • HSP_PM_RULES
  • HSP_LINKS
  • HSP_COLUMN_DETAIL
  • HSP_COLUMN_DETAIL_ITEM
  • HSP_MRU_MEMBERS
  • HSP_PRINT_OPTS
  • HSP_AUDIT_RECORDS
  • HSP_AUDIT_OPTIONS
  • HSP_CELL_NOTE
  • HSP_CELL_NOTE_ITEM
  • HSP_TASK
  • HSP_USER_TASK
  • HSP_CHECKOUTS
  • HSP_WF_PREFS
  • HSP_FORM_ATTRIBUTES
  • HSP_USER_VARIABLE
  • HSP_USER_VARIABLE_VALUE
  • HSP_ACTIVITY_LEASE
  • HSP_WF_SET_SCREEN
  • HSP_ENUMERATION_ENTRY
  • HSP_ENUM_EVALUATION
  • HSP_MENU_ITEM
  • HSP_FORM_MENUS
  • HSP_FORM_VARIABLES
  • HSP_UDA
  • HSP_MEMBER_TO_UDA
  • HSP_MEMBER_FORMULA
  • HSP_DRIVER_MEMBER
  • HSP_FX_VALUES
  • HSP_SPREAD_PATTERN
  • HSP_COMPOSITE_FORM
  • HSP_COMPOSITE_BLOCK
  • HSP_COMPOSITE_FORM_PANE
  • HSP_COMPOSITE_PANE_DIM
  • HSP_TEXT_CELL_VALUE
  • HSP_JOB_STATUS
  • HSP_PM_DIMENSION
  • HSP_PM_PRIMARY_MEMBER
  • HSP_PM_SECONDARY_MEMBER
  • HSP_PM_MEMBER_OWNER
  • HSP_PM_SVDIM_BINDING
  • HSP_FORM_DV_RULE
  • HSP_FORM_DV_CONDITION
  • HSP_MBR_SELECTION
  • HSP_MBR_SELECTION_ITEM
  • HSP_ESSBASE_SERVER
  • HSP_CUBE_LINK
  • HSP_CUBE_LINK_DIMMAPS
  • HSP_FORM_DV_PM_RULE
  • HSP_FORM_DV_USER_IN_PM_RULE
  • HSP_PM_MEMBER
  • HSP_PM_OUT_OF_OFFICE
  • HSP_USER_DIM_DISPLAY_PREFS
  • HSP_LINE_ITEM_MEMBER
  • HSP_ACTIVE_SERVERS
  • HSP_ADHOC_OPTS
  • HSP_FORM_CONTENT
  • HSP_ESSBASE_CUBE
  • HSP_DP_DIMENSION
  • HSP_DP_MEMBER
  • HSP_DP_TYPE_FORM
  • HSP_DP_TYPE_QUERY
  • HSP_DP_TYPE_QUERY_MEMBER
  • HSP_DP_TYPE_QUESTION
  • HSP_OBJECT_NOTE
  • HSP_DP_SHARING_ENTITIES
  • HSP_DP_REVIEWER
  • HSP_DP_TYPE_MAPPING
  • HSP_EXT_XACT
  • HSP_EXT_XACT_DETAIL
  • HSP_GRID_STATS
  • HSP_DP_SVBR_BINDING
  • HSP_APPLICATION_CONTENT
  • HSP_MEMBER_ON_FLY_DETAIL
  • HSP_MEMBER_ON_FLY_USAGE
  • HSP_DP_ATTRIBUTE
  • HSP_DP_TYPE_ATTRIBUTE
  • HSP_DP_MEMBER_ATTRIBUTE
  • HSP_HEALTHCHECK_STATUS
  • HSP_HEALTHCHECK_CRITERIA
  • HSP_OLU_STATUS
  • HSP_OLU_STATUS_REC
  • HSP_PARTITION
  • HSP_PARTITION_AREA
  • HSP_BUSINESS_METRICS
  • HSP_CALC_MGR_RULES
  • HSP_CALC_MGR_RULESETS
  • HSP_CALC_MGR_VARIABLES
  • HSP_CALC_MGR_USER_VAR_PPT
  • HSP_FORM_FORMAT_OBJECTS
  • HSP_ANNOUNCEMENTS
  • HSP_OBJECT_MOBILE_ACCESS
  • HSP_HISTORICAL_JOB_STATUS
  • HSP_JOB
  • HSP_REPORT_TEMPLATE_DEF
  • HSP_REPORT_TEMPLATE

Wednesday, 7 December 2016

Hyperion Planning – Resizing the popup window size for runtime prompts

In this blog, I would be talking about resizing the popup window size for runtime prompts in Hyperion Planning workspace. The catch with the runtime prompt popup is that it spreads across the webpage and it is without a scrollbar so it’s a bit difficult to see what is what especially the buttons present on the popup.
Now, the below snapshot shows a runtime prompt popup window in my system. Observe that it spreads across the page and the launch button is not clearly visible.
Now, in order to resize the popup window, you need to go to “Administration”->”Application”->”Properties” as shown in the below snapshot.
This opens the application properties as shown in the below snapshot.
You would need to add two properties for the application that define the runtime prompt window size. These are: -
  • RTP_WIN_WIDTH which specifies the width of the runtime prompt launch window.
  • RTP_WIN_HEIGHT which specifies the height of the runtime prompt launch window.
The properties setup for the application is as shown in the below snapshot.
Once the properties are set, you would need to restart the services once for the changes to be reflected. The below snapshot shows me restarting my Hyperion services.
Once the session is restarted, the resized runtime prompt window is as shown in the below snapshot.

Sunday, 4 December 2016

Reading a Hyperion EPM Install Log files and checking the time taken to install individual components

In this blog, I would be talking about how to read a Hyperion EPM Install logs. Although not needed to be done on a regular basis, it is still important to know how to read the log since its handy the day when all things go wrong. (For example, the ODI install failing in the root mode…Could only be debugged by reading the log file.. http://exploitsinhyperion.blogspot.in/2016/11/fdmee-install-failing-on-linux-box-in.html )

The Hyperion EPM install that I did is made up of the following components: -
  • Hyperion Foundation
  • Calculation Manager
  • Planning
  • Essbase
  • FDMEE
The install log is as shown in the below snapshot.
The log in a text editor is as shown in a below snapshot.
The log file is basically made up of entries enclosed in square brackets. Since manipulating the columns is a bit tedious in a text editor, I copy paste it into an Excel sheet and do a text-to-column using the “]” as a delimiter.
The file in Excel is as shown in the below snapshot.

The first field is basically a timestamp entry of when the entry was logged. The second field is basically the status of the log entry as shown in the below snapshot.
The entries in the status column is as follows: -
  • ERROR
  • NOTIFICATION
  • TRACE
  • WARNING
The errors status basically lists out the errors that were encountered during the install. The below snapshot shows the errors that exist in the given install. (Although the install went perfectly, it looks like it noted a NULL pointer exception as an error)
The warnings encountered during the install is as shown in the below snapshot.

Trace basically lists out the steps that were done during a component install. It is more like an install stack trace that can be used for walking through the steps of the install. A snapshot of the TRACE instruction is as shown in the below snapshot.

NOTIFICATIONS list out important status messages like successful install of components, files check and so on. We would be using this for checking the install sequence of the components. A list of NOTIFICATIONS captured in the install log is as shown in the below snapshot. 
I copy paste the NOTIFICATIONS into a separate tab.
I now keep just the timestamp column and the message in the sheet and format the columns a bit as shown in the below snapshot. The first few entries are the installer creating log streams for logging information and errors.

The next snapshot lists the installer checking that the user has access to the files that will be used during the install. The installer checks access to the setup.jar, the assemblies files and the JRE. 
The next snapshot lists the LOCALE selected for install and the various states that the install wizard goes through.
The next snapshot shows the log file name and error file names that would be used by the installer.
The next snapshot shows the Weblogic component install being started and it finishing successfully.

I now format the install logs to get the time stamp field from the log file and take a difference between the start time and the end time as shown in the below snapshot. I take the difference between the start and end time to see how much time the components take to install.
The next table shows the time taken to install the components in my environment. 

The ODI engine takes a bulk of install time, followed with Weblogic and Oracle common components. The other components are pretty straight forward and install in less than a minute each. 

Friday, 2 December 2016

Hyperion Shared Services – Getting users and the groups they belong to by diving into the backend mess

In this blog, I would be talking about Hyperion Shared Services and messing around with the backend tables that make the brains of HSS. Today, we are going to get the users and the groups they belong to using SQL and by checking the backend tables that store this information.
The below snapshot shows the users that exist in my Hyperion EPM system. I have got three users whose name begins with testuser and admin who is the Shared Services administrator.

The information about the users is stored in the table called CSS_USERS which is present in the Hyperion Shared Services schema.
A select statement on this table gives an output as shown below.
The fields of the CSS_USERS table is as shown in the below snapshot.
The important fields are IDENTITY_ID which is the internal ID for the user name, NAME which is the user name, PASSWORD which is the password field.

Observe the last two columns in the above snapshot.

LOWER_IDENTITY_ID and LOWER_NAME which is basically the lowercase of the IDENTITY_ID and the NAME fields in the above table. This is the reason why you can enter your user name in either uppercase or lowercase and it still works. The comparison happens on the LOWER_IDENTITY_ID and LOWER_NAME.

The below snapshot shows the CSS_USERS table that is pivoted. Observe the data in the password field. The password field is encoded using SSH2 algorithm is my guess.
The next snapshot shows two groups that I have created for the REVPLAN application and WORLD group which is the default group in Hyperion.

The next couple of snapshot shows me adding the test users to the groups.


The information of the groups is stored in a table called as CSS_GROUPS as shown in the below snapshot.
The metadata of the CSS_GROUPS table is as shown in the below table.
The pivoted CSS_GROUPS table is as shown in the below snapshot.
Now, while the CSS_USERS table has information of the users in Hyperion EPM and the CSS_GROUPS table has information on the groups created in Hyperion EPM, the association of users to groups is stored in a table called as CSS_GROUP_MEMBERS which is as shown in the below snapshot.
The metadata of the CSS_GROUP_MEMBERS table is as shown in the below snapshot.

In the above snapshot, GROUP_IDENTITY matches the IDENTITY_ID field of the CSS_GROUPS table and the MEMBER_IDENTITY matches the IDENTITY_ID field of the CSS_USERS table.

Thus, by having a SQL join, we can get the information of users and which groups they belong to.

A simple SQL query to get this information is as shown in the above snapshot.

The output of the query is as shown in the below snapshot.