All posts by Sorin Suciu

About Sorin Suciu

Sorin is a MicroStrategy specialist, experienced in Retail, Telecom and Customer Operations. Blogging is where his passion for writing met his geek nature and decided they should do some crazy things together. Though not a funny guy himself, he is obsessed with arguably funny stuff, such as Terry Pratchett, Monty Python, Douglas Adams and live parrots.

Intelligence Server SDK startup kit

I happen to know a guy or two whose curiosity for Intelligence Server SDK increased alarmingly in the last couple of months. I dedicate this article to them, and anybody who would like to get their hands dirty with some cool stuff.

But first of all, what is IS SDK? Most of the SDK guys are familiar with the Web SDK, the one which allows endless customizing to the web interface of MicroStrategy, amongst other things. Intelligence Server SDK, on the other hand, deals with reading, creating, modifying and executing objects from your Metadata. One can easily consider it to be Command Manager’s big brother who went to College. Unlike Command Manager, IS SDK is anything but user friendly. But man, it packs a serious punch if you learn how to handle it! The documentation and Tech Notes do provide all the necessary information to do just about anything, but actual examples are scarce.

IS SDK can be used via Visual Basic or C++. Since I’m by no means a pure breed programmer, I work with VBA, which is more or less like speaking English to the computer.

Enough introductions already. If you want to unleash its power, the first thing you must do is connect to a project. This apparently simple task poses enough challenges to deter many an enthusiastic programmer from going any further. I find this counterproductive and quite discomforting.

This is why I assembled a startup kit customized for VB6, which offers the code and explanations on how to connect to a project. Actually, it is the exact form that I used for Metadata Browser.

Download here:
Connection.zip

Updates and new tips may come in the future, depending on your feedback.

Spool space error

Okay, so this is an old one, but I still find it useful.

If you can’t run a report because of a spool space error, and you can’t convince the DBA to give you a couple of gigabytes more, then you might want to go to the Report Editor, Data ->VLDB Properties -> Tables -> Intermediate Table Type and select True temporary table.

What this does is modifying the SQL so that instead of having a huge chunk of code (that would use up a lot of memory) it breaks the code into CREATE – INSERT bits that are far easier to handle. It also makes the SQL more readable by humans (this includes programmers).

By the way, this setting also comes to rescue when you get the “Database is terrified by the script and it can’t even begin to analyze it” error. I don’t have the specific error message at hand, but I know for sure that Teradata does this when the SQL code is all in one pass and is so large that it can be seen from the Moon.

Manual Mapping

In a previous post, I’ve warned about the not so automatically behavior of the automatic mapping. However, I can’t blame the manual mapping for the same degree of inconsistency. I mean, boy, that’s as manual as it gets!

Take a manually mapped attribute and have a look at its source tables. Now drop the attribute from one of these tables (on database and Catalog level) and try to run a report which used that table.

On the one hand, MicroStrategy knows from the attribute definition that it can include that table into the SQL. On the other hand, it should know from the table definition, as updated in the Warehouse Catalog, that the column is no longer there, but such a small detail doesn’t have enough force to deter the SQL Engine. So it simply writes the SQL as if nothing had happened, and the only error you get is from the database (i.e. a11.attribute_id does not exist).

So, if you aren’t doing this already, don’t forget to inform the manually mapped attribute that one of its source tables decided to discontinue their relationship, next time you indulge in such data model changes.