Tuesday 26 November 2013

Pentaho 5 Restful Web Services 101

With the latest release of Pentaho V5 comes some very cool new features. One that we were really interested in had to be the new Restful Webservices.

Lets take a look at some of the core Repository features.

  • Navigate Repository Contents
  • Manipulate Repository Contents
  • Edit User and Group Permissions

Manipulating the Pentaho Repository

A quick word about the syntax of solution directories. With the new Restful API, solution directories are broken up using the : character. So for example, if we wanted to render a report called sales.prpt in the steel-wheels/reports/sales-reports directory the url would look a little like this:

steel-wheels:reports:sales-reports:sales.prpt

Listing Repository Contents

There are two types of repository listing requests. One gets the list of files and folders (including child folders to a certain depth if specified) and the other returns properties of a certain file or folder. 

We can start by listing all the files and folders in the public solution folder:

http://localhost:8080/pentaho/api/repo/files/:public/children

If we wanted to return the content of the public/cde directory we would execute:

http://localhost:8080/pentaho/api/repo/files/:public:cde/children

By default the children request lists all files and folders including nested files and folders (not including hidden files and folders). Its possible to pass in some argument to filter our results

depth

the depth argument defines the depth of folders we wish to query. by default the depth is -1. This returns ALL folders. If we set it to 0 we get only the contents of the currect folder. if we set it to 1 or more we get the contents of the child folders to that depth

showHidden

By default hidden files are not returned. to show hidden files in the results we simple pass in the argument showHidden=true

filter

It is possible to filter if we want to return Files or Folders. We do this with the filter argument. For example, to filter only solution files we would add the following argument: filter=*|FILES. To list onlt folder we would do filter=*|FOLDERS

Getting Solution folder / file properties

If we want to get the details for a simple solution file or folder we can use the properties webservice. For example, to get the properties of a solution file called sales.prpt in the public/mysolution/reports folder we would do something like this

http://localhost:8080/pentaho/api/repo/files/:public:mysolution:sales.prpt/properties

Creating new Folders

Lets assume we want to create a new folder in the public solution directory called myreports. To create the new folder we simple execute the following request

http://localhost:8080/pentaho/api/repo/dirs/:public:myreports

Deleting Solution Files and Folders

Lets assume we now want to delete the myreports folder in the repository. before we can delete a file or folder we need to get its ID. We can use the properties request method to get a file or folder id.

Once we have the id of the file(s) or folder(s) we want to delete we can execute the delete and pass in the list of ID into the response header as a comma separated list

http://localhost:8080/pentaho/api/repo/files/delete

Listing File or Folder ACLs

We can get the permissions for a particular solution file or folder using the acl service. For example, if we wanted to get the permissions for the public folder we could execute the following request:

http://localhost:8080/pentaho/api/repo/files/:public/acl

This will return the ACL descriptor for the public directory

Setting ACLs for Files or Folders

If we want to set new permissions to a certain solution file or folder we can use the same service but pass in a response header with the new ACL definition using PUT.

Summary

So this is just a quick overview of some of the Pentaho BI Server Restful Web Services but it should be enough to get you started with integrating Pentaho into your own applications



Monday 28 October 2013

Welcome to Ivy!


Hello! 

This is our first blog to welcome you all to a new data analytics consultancy in the UK…

We are excited….really excited. It presents the culmination of months of discussions and bringing together the very best skills aligned to the right market strategy.

We are the hippies of the BI world, rebelling against the machine. Though less flower power, more the use of great alternatives, great talent, great enthusiasm.

Apart from my love of commercial products like the ‘Ipad’, the team always look for the open tools, the commercially viable closed tools, the more scalable, the lesser cost, the BETTER tools.

To borrow a clichéd overused sales line…. We want value for our clients. We deliver value, we retain our clients and build our business.

IVY may be in its infancy, but it combines three IT consultancies combining over 40 years Business Intelligence (BI) and Data Analytics experience. A member of our executive team was working BI projects when BI was yet to be termed by anyone. It was called an ‘Executive Information System’.

We currently have skills in Pentaho, Talend, Actuate, Vectorwise, Mongo DB and are close to acquiring skills in Hadoop, Yellowfin, MapR and more.

There are clearly no mega vendors in there, no huge license fees; it presents a challenge in a procurement process. It is still seen (naively) as risk adverse to go with an SAP stack… in some cases it is, they have some great stuff…but there are many examples of organisations locked in to their contracts, too expensive to change (though there is a desire to) and large amounts of shelf-ware.

It’s not just the cost, our clients love our solutions and they love working with us.

This brings me nicely to my next point. We talk to our customers like people, we are professional with a clear structure on delivery and support but we talk like human beings. You can spot an IBM’er from a mile off…once again we want to buck the trend, do things our way.

So we like being different, we are excited about what we are doing and where this is going.

We are launching today and hopefully we continue this success and help enable our customers to be.

Contact us at enquiries@ivy-is.com