Skip to main content

Posts

Pentaho Data Integration - Multi-part Form submission with file upload using the User Defined Java Class Step

I recently needed to use Pentaho Data Integration (PDI) to send a file to a server for processing using HTTP Post. I spent several hours trying to use the existing steps HTTP Post, HTTP Client & Rest Client but I couldn't get it to work. After some more research I came across the issue PDI-10120 - Support for Multi-part Form Submittal In Web Service Steps  and I thought I was out of luck. I previously wrote a small Java client for a similar use case and remembered the PDI has a step called User Defined Java Class  (UDJC). After reading this great tutorial I created the following basic transaction. I have a dataset with the URL and the full file path and use the UDJC to make the HTTP call. HTTP Post using User Defined Java Class The Java class handles the actual HTTP Post. It uses 2 input variables, the URL (url) which is used for the call and the file name (longFileName). The HTTP call then contains the file (line 30) and the file name (line 31). I included some basi
Recent posts

Creating YTD transformation tables

The other day I had to setup a new data warehouse that will be used for reporting with MicroStrategy. Part of it was setting up the date dimension including the transformation tables. I had a quick look online and couldn't find any script doing the work for me so I created them myself (with the help of a colleague). All you need is an existing date dimension with date_id, year_id, quarter_id, month_id and week_id, you can find plenty of scripts for that online. YTD table select t1.day_id, t2.day_id INTO YTD_DAY from LU_DAY t1, LU_DAY t2 where t1.day_id >= t2.day_id and t1.year_id = t2.year_id QTD table  select t1.day_id, t2.day_id as qtd_day_id INTO QTD_DAY from LU_DAY t1, LU_DAY t2 where t1.day_id >= t2.day_id and t1.QUARTER_id = t2.QUARTER_id  MTD table select t1.day_id, t2.day_id as mtd_day_id INTO MTD_DAY from LU_DAY t1, LU_DAY t2 where t1.day_id >= t2.day_id and t1.month_id = t2.month_id  WTD table select t1.day_id, t2.day_id as wtd_day_id INTO WTD_D

MicroStrategy - Setting the level of the view filter

While creating a dashboard in Desktop i came across a requirement where the view filter needs to be applied to the grid level, not the level of the data set which seems to be the default behavior. Here is how you can change it in MicroStrategy Web (based on the documentation ): Open your dashboard in Design Mode in MicroStrategy Web Right click on the grid to edit the view filter. Next to the filter you will see an arrow pointing up. If you hover over it gives you the info "Apply condition at the level of the report objects". Click on this arrow. It will change and point down. Hovering over it will say "Apply  condition at the grid level", which is what you want. UPDATE: You can change the behavior in Desktop too. You have to right click on the info symbol to order to change the level. I did not expect that... Have a great weekend!

MicroStrategy - Metric doesn't show in dashboard

Today I ran into an issue while moving a dashboard from our development environment to our testing environment and one of the metrics wouldn't show up, instead it would just show the name of the metric. I can imagine this is an issue that others might face too so here is my quick fix: Check the permissions for the metric . You see below the metric doesn't show up, but all other ones, even from the same data set, work fine. I right clicked on the Metric and went to Properties -> Security and saw the perms where set to Administrator only. After changing it to allow the appropriate group to view the metric the dashboard displayed correct.

Derived Elements in MicroStrategy 9.3.1

I recently updated our development environment from MicroStrategy 9.2.1m to version 9.3.1. While testing if the update broke anything I found out that some of my attribute selectors are no longer working. All affected selectors used derived elements which were defined in the grid report - not in the dashboard. If you run into the same issue try the following: Remove derived elements from the grid report Open your dashboard in editable mode in the web Add the attribute to your grid on the dashboard Create derived elements in the dashboard. An example can be found in this technote . Create a selector from this attribute. Hope this helps.

MicroStrategy - Custom Formatting

My favorite blog on MicroStrategy is Bryan's MicroStrategy Blog . That's where I found a very helpful post on custom formatting which I have used a couple times. The issue is the following: You have a metric that can contain very small and very large values. How can you make sure that the value is always useful for the user (10 Mio instead of 10,000,000 where you have to count the 0 to know what it is) and that it doesn't take too much space on the dashboard?

Products you don't expect to be 'Made in China' - Presidents Choice Organic Rice Rusks for babies

Yesterday I had a surprise once again while I was feeding our 9 months old sun "Risk Rusks". These are little rice crackers a baby can eat. I thought I did something good by buying organic and Presidents Choice is usually a decent brand but whenever I looked at the ingredients I saw the label "Made in China". Why on earth do we have to ship our baby food all the way from China? I guess I have to look for another brand for Risk Rusks now...