Enterprise power with human face

Saturday, October 6, 2012

TM1 API Response Options

Standard data formats for API responses are XML or JSON. However, how to get such structured data using current TM1 output options with no or minimal adjustments?

It took us few days of brainstorming and seemed to be little tricky first, but solutions are almost brilliant.

Firstly, why not leveraging XML-based Cognos Reports? With few simple integration steps, you can publish your cubes to Cognos Connections and subsequently design list objects exactly as output requires. Thanks to Cognos SDK, such reports can be later accessed from the custom application interface via REST or SOAP and processed anyhow you imagine.

Secondly, why not playing a little directly with TM1 Text Output and JSON-like format data before even storing them in temporary text file? Despite TM1 Text Output does not allow perfect results, the output is almost impeccable and requires only few adjustments before loading with server side script.
You can read more about JSON-like TM1 Text Output in the following article.

Believe it or not, all brilliant solutions also have few disadvantages.

XML-based Cognos Reports version
  • Cannot output subset of data from the source cube
  • Offers only XML-based structure (personal)
  • Requires Cognos BI license
JSON-like Text Output
  • Requires temporary storing possibly unsecured data in the text file
  • Must be transferred to real JSON and  processes for possible errors

Although both options have their obstacles I decided to implement and further describe JSON version based on Text Output mainly because of the independence to Cognos BI software and possibility to define outputted subsets.

You can read more about securing text files and transferring JSON-like to JSON data in the following articles.

For the XML lovers I promise to come back to option leveraging XML-based reports and Cognos SDK later in the series.

No comments:

Post a Comment