Dodeca tracks every update made to your Essbase database automatically. It keeps track of who made the update, when it was made, what the dimension intersection was, and the old and new values. It stores this information very efficiently in three tables in the Dodeca repository:
This is a terrific resource for organizations to use for understanding the who/what/when and where of the updates to their cubes.
You can query these tables directly and view the information in a Dodeca View.
The Sample application that is shipped with Dodeca has an example of this. The View titled “Audit Log Search” and can be seen in the Hierarchy under Input:
Once you open the View, you can use the selectors to identify the dimensional intersection and see the log of the updates:
Do you have a View in Dodeca which is sending data back to the cube and do you want to see information on these updates? If so, this post may serve to demonstrate a shortcut to setting up your audit log view.
In this blog post, I am going to show you how you can use the existing View from the Sample application to create an Audit Log specific for your environment. Here are the steps we will follow:
- Export the metadata for the Audit Log Search view from the Sample application
- Import the metadata into my target Dodeca tenant, called FINOPS
- Update the metadata in the FINOPS tenant:
- Update the View tokens on the View to reflect the correct tokens for my application
- Update the SQL passthrough dataset for my specific essbase cube
- Update the View Selectors to match the dimensions in my cube.
- Update the View template and Appearance property for the correct dimensions
Step 1: Export the metadata for the Audit Log Search view from the Sample application
In the Sample application, use the Admin menu item and select “Export Metadata to Local Zip File…”
When the list of metadata appears, click on the ID column to sort by name:
Then scroll down to the Audit Log metadata objects. We need the following four objects:
1. DAL_Datapoint_SampleBasic – SQL PTDS
2. DataAuditLogDatapoint_SampleBasic – General
3. DataAuditLogDatapoint_SampleBasic – View
4. DataAuditLogDatapoint_SampleBasic – WorkbookScript
Export these objects and save them to a file that we can access when we import them into the FINOPS application. I saved them to a file called DALSample.zip on my desktop.
Step 2. Import the metadata into my target Dodeca tenant.
Now I go to my FINOPS application. This application currently has an Essbase connection to my cube, imported dimensions from the cube, and a SQL connection to the Dodeca repository. I currently only have one View in the hierarchy called Budget Input:
To import the Audit log metadata, go the Admin menu item and this time select “Import Metadata from Local Zip File…” Navigate to the file, then select all items for input. Hint: you can simple check the box at the top to select all the items.
Once imported, there is no visible change in the application console because we haven’t added the View to Hierarchy yet. If we navigate to Admin -> Views, we will see it there.
An important note: We imported 4 objects that have specific ID’s and Names. The Names of these objects can be updated, but the ID’s cannot. For example, the View listed above has the Name “Audit Log Search” and an ID of “DataAuditLogDatapoint_SampleBasic”. For the purpose of this blogpost, we will simply keep these ID’s and update the names. It we wanted the change the ID’s of the objects to better reflect the cube used, we could copy the objects to new ID’s and delete the originals.
Step 3: Update the metadata in the FINOPS tenant
Step 3-1. Update the tokens on the View to reflect the correct tokens in my application
While staying in the View metadata editor, click on the plus sign next to Tokens. You will see there are 4 View tokens. Click on the ellipsis to view and edit these tokens:
We see the four tokens and their current definition. They are defined for the Sample application in my environment.
We want to update them to use a new Tenant, Application, and Cube. The Server token definition will remain the same.
Step 3-2. Update the SQL Passthrough Dataset for the specific essbase cube.
We imported a SQL Passthrough Dataset which retrieves the data from the Audit Log tables in the Dodeca repository. But that SQL PTDS is specific for the dimensions defined in the Sample Basic cube. We need to update the SQL PTDS for the cube used in this application.
There are tokens in the SQL PTDS that reflect the dimensions in the Essbase cube that is referenced. The Sample Basic cube has 5 dimensions, and the PStores Plan cube has 6 dimensions. We need to update the SQL PTDS for the dimensions in the cube we are tracking.
Navigate the SQL PTDS metadata editor via Admin -> SQL Passthrough Datasets. There is only one there, with the name DAL_Datapoint_SampleBasic. (As noted earlier, we can update the name, not the ID).
Let’s rename it to DAL_Datapoint_PStoresPlan, then click on the ellipsis next to “1 query defined”:
Next click on the ellipsis next to SelectSQL.
This will open the editor for our Select statement.
We can see that there are 5 tokens listed in the middle of the statement that reflect the 5 dimensions in the Sample Basic cube. We are going to update these to reflect the 6 dimensions in out Plan cube. The six dimensions are
We will also update the HAVING (COUNT(*) statement from 5 to 6. See below:
All done with the SQL PTDS.
Step 3-3. Update the View Selectors
We will open the View metadata editor again and look at the View Selectors:
There are 5 Selectors, but they match the dimensions from Sample Basic. I can click on the ellipsis to update the Selectors for the 6 dimensions already defined in the application.
There is another step we need to complete here. Since this is by nature a SQL View and not an Essbase View, we need to update the Connection Policy to “UseSpecifiedConnection” and then update the Connection Settings column. Use the dropdown on the Connection Policy column to update to “UseSpecifiedConnection”, and then click on the cell in the Connection Settings to update the “EssbaseConnectionID” setting, and the EssbaseLoginServiceObjectTypeID setting for each Selector.
Step 3-4: Update the Appearance property and the View Template.
While still in the View metadata editor, I want to update the Appearance property “CaptionAfterBuild”. This is currently set to reflect the original tokens:
I will update it for our current tokens:
The last step is to update the template, and this is again for, you guessed it, the correct tokens. From the View metadata editor, click on View Template Designer.
Then update the tokens listed on line 4 of the template:
All done. Now we are ready to test.
I can Preview the View from the View Metadata editor. Once opened, I can use the selectors to specify the dimensional intersection where I want to audit the updates.
And it works! If you like, you can add this view to the View Hierarchy, and you can also drill to this from the Budget Input View as described in this post here.
Reusing the Audit log metadata from the Sample application saved us from creating the View and writing the complex SQL statement from scratch. There was still a bit of configuration to do, but we saved a good amount of time. Please let me know if you have any questions!