Camshaft MDX tool updated and available

Some of you may recall a tool I released quite some time ago (seemingly to beta-testing purgatory) called Camshaft. Camshaft is a simple Java utility that executes a given MDX query against an Essbase cube and outputs the results. The original version of Camshaft came out around two years ago. This version is built on the same framework but includes various updates and new options. In the interim, the output abilities of the MaxL interpreter have been improved a bit, and with the right incantation it can now output pretty useable data.

The name Camshaft is actually a portmanteau of who the tool is named for, and the feeling that he gets when writing a load rule (especially one loading in MDX data). It’s not every day that a tool is named after a tool, but I digress (I kid, I kid!).

Anyway, Camshaft offers a fairly wide array of options to customize the output from an MDX query. You can suppress headers, choose your column delimiter, how to format #Missing/#NoAccess cells, and more. There’s even an output option to generate an HTML table if you want.

You could run this query, for example:

SELECT
        CROSSJOIN({[Jan], [Feb], [Mar]}, {[Curr Year], [Prev Year]}) ON COLUMNS,
        {[Measures].Levels(0).members} ON ROWS

And you might get this output (depending on options):

	                        Jan, Curr Year          Jan, Prev Year          
	Original Price          #Missing                #Missing                
	Price Paid              #Missing                #Missing                
	Returns                 #Missing                #Missing                
	Units                   #Missing                #Missing

Of course, maybe you want Jan, Curr Year to be on multiple lines. Just pass in the --line-per-header command-line argument and get that output:

	                        Jan                     Jan                     
	                        Curr Year               Prev Year               
	Original Price          #Missing                #Missing                
	Price Paid              #Missing                #Missing                
	Returns                 #Missing                #Missing                
	Units                   #Missing                #Missing  

It’s fairly flexible. You can output to the console or a given text file, and more. You can suppress the whole header if you want. The latest version of the documentation for Camshaft is online (and will be updated from time to time as refinements are added), as well as inside of the Camshaft downloadable file. The Camshaft download site is here (also available on the small Camshaft info page).

Camshaft is a free utility offered with no support or warranty (although feature ideas are welcome), and is closed source (for now), although sometime in the future I may just open the source code up so that some intrepid developers can do what they want with it.

3 thoughts on “Camshaft MDX tool updated and available

  1. Thanks for sharing Camshaft with the community.

    I have a question. When I query large numbers, they are shown as scientific notation (e.g. 2.276708147924767E11). How can I change that in such way that it would be shown as in EAS (e.g. 227670814792.477)?

    Thanks for replying.

  2. I have another question. When I look at the usage instructions that the jar file displays it says for the option –query the following: “Query to execute, or filename containing query”

    While I can pass successfully a query, I fail when I want to specify a filename such as M:\Documents\camshaft\MdxQuery.txt

    Can you confirm that it is possible to indicate a filename and what is the exact syntax that must be used?

    • Hi André,

      Thanks for your feedback. There may be a bug in the software that I’ll look into. Additionally, I don’t think there are presently any options to affect scientific notation or not. But I should be able to make a fairly quick adjustment to provide that option. I’ll post a new version in the near future.

Leave a Reply

Your email address will not be published. Required fields are marked *