13
A Quick How-To: Leveraging BI Web Services to Deliver Data to Dashboards It seems that all Dashboards projects, at least when they’re past the POC phase, run into obstacles around getting live data in in the correct format. In pre 4.0 engagements, QaaWS (Query as a Web Service) was replaced by the “Query Browser” option embedded within Dashboard Design. QaaWS still works but only with .unv universes and not with the .unx universes that are created with Information Design Tool. The Query Browser tool can be used with these new .unx universes but many of the same limitations that were found in QaaWS are still present. For all intents and purposes, you are limited to structuring your data in a vertical table layout and the only control you have over the formatting of the result set must be established at the universe level. I often leverage this Query Browser option when needing to populate drop down boxes or simple list views as these two examples require little manipulation and the vertical table structure is perfectly appropriate. Additionally, the Query Browser option allows for integration directly with certain components on the dashboard, negating the need to dump the data to Excel constantly, thus decreasing the burden on the dashboard at run-time. Look for more information on the Query Browser option in a future posting as in this post we will discuss the alternative to these two options called BI Web Services. BI Web Services offer significantly improved options to customize and manipulate how you want your data returned to the dashboard. BI Web Services work by structuring your query based on a Web Intelligence document that you publish to be used which creates a WSDL (Web Service Definition Language) that can be imported into Dashboard Design. Once imported, the developer sets where the result set should be placed in the dashboard, including the table header, the body of the table and the footer if applicable. Additionally, with a BI Web Service, there is the ability to pass dynamic prompt values into a web service as well as other criteria such as if you want the query to refresh or return the latest saved data, or which record numbers you want to see. For example, if I want to see rows 1 through 10 from the table just as I saw it in Web Intelligence when I published the Web Service, I would set the Web Service in Dashboards to not refresh and the start and end row numbers to 1 and 10 respectively. Below you will find a step by step guide to publishing and using a BI Web Service in Dashboard Design. The 5 Overall Steps are below; the detailed guide is after this. Step 1: Creating and Saving the Web Intelligence Document Step 2: Publishing a “Block” as a BI Web Service Step 3: Importing the WSDL into Dashboard Design’s Data Connections Step 4: Configuring the Data Connection to work in the Dashboard as Desired Step 5: Action!

A Quick How-To: Leveraging BI Web Services to Deliver · PDF fileLeveraging BI Web Services to Deliver Data to Dashboards ... negating the need to dump the data to ... SAP HANA, mobility,

Embed Size (px)

Citation preview

Page 1: A Quick How-To: Leveraging BI Web Services to Deliver · PDF fileLeveraging BI Web Services to Deliver Data to Dashboards ... negating the need to dump the data to ... SAP HANA, mobility,

A Quick How-To: Leveraging BI Web Services to Deliver Data to Dashboards It seems that all Dashboards projects, at least when they’re past the POC phase, run into obstacles around getting live data in in the correct format. In pre 4.0 engagements, QaaWS (Query as a Web Service) was replaced by the “Query Browser” option embedded within Dashboard Design. QaaWS still works but only with .unv universes and not with the .unx universes that are created with Information Design Tool. The Query Browser tool can be used with these new .unx universes but many of the same limitations that were found in QaaWS are still present. For all intents and purposes, you are limited to structuring your data in a vertical table layout and the only control you have over the formatting of the result set must be established at the universe level.

I often leverage this Query Browser option when needing to populate drop down boxes or simple list views as these two examples require little manipulation and the vertical table structure is perfectly appropriate. Additionally, the Query Browser option allows for integration directly with certain components on the dashboard, negating the need to dump the data to Excel constantly, thus decreasing the burden on the dashboard at run-time. Look for more information on the Query Browser option in a future posting as in this post we will discuss the alternative to these two options called BI Web Services. BI Web Services offer significantly improved options to customize and manipulate how you want your data returned to the dashboard.

BI Web Services work by structuring your query based on a Web Intelligence document that you publish to be used which creates a WSDL (Web Service Definition Language) that can be imported into Dashboard Design. Once imported, the developer sets where the result set should be placed in the dashboard, including the table header, the body of the table and the footer if applicable. Additionally, with a BI Web Service, there is the ability to pass dynamic prompt values into a web service as well as other criteria such as if you want the query to refresh or return the latest saved data, or which record numbers you want to see. For example, if I want to see rows 1 through 10 from the table just as I saw it in Web Intelligence when I published the Web Service, I would set the Web Service in Dashboards to not refresh and the start and end row numbers to 1 and 10 respectively. Below you will find a step by step guide to publishing and using a BI Web Service in Dashboard Design. The 5 Overall Steps are below; the detailed guide is after this. Step 1: Creating and Saving the Web Intelligence Document Step 2: Publishing a “Block” as a BI Web Service Step 3: Importing the WSDL into Dashboard Design’s Data Connections Step 4: Configuring the Data Connection to work in the Dashboard as Desired Step 5: Action!

Page 2: A Quick How-To: Leveraging BI Web Services to Deliver · PDF fileLeveraging BI Web Services to Deliver Data to Dashboards ... negating the need to dump the data to ... SAP HANA, mobility,

Step 1: Creating and saving the Web Intelligence Document: Create a New Web Intelligence Document, for this example, we will choose a Universe and then the eFashion.unx Universe

Create your query, we chose Store Name, Year and Sales Revenue with a query prompt on Year

After you run your query, format the block how your result set needs to be returned. We will remove Year from our table and leave Store and Sales Revenue. Make sure that you save the document to the CMS before proceeding.

Page 3: A Quick How-To: Leveraging BI Web Services to Deliver · PDF fileLeveraging BI Web Services to Deliver Data to Dashboards ... negating the need to dump the data to ... SAP HANA, mobility,

Step 2: Publishing a “Block” as a BI Web Service

After setting up the block as desired, right-click on the outer edge of the table and select “Publish as Web Service”

The following screens will walk you through the process of publishing this Web Service.

Page 4: A Quick How-To: Leveraging BI Web Services to Deliver · PDF fileLeveraging BI Web Services to Deliver Data to Dashboards ... negating the need to dump the data to ... SAP HANA, mobility,

This screen checks the server for duplicate content to the block you’re currently working with.

This screen allows you to choose which prompts from the report to use, we enable all.

This screen allows you to name and describe this web service. I recommend making these names VERY clear as in a production environment there can be hundreds, if not thousands of web service methods. Additionally, keep the name of the Web Service method very similar to the name of the report.

Page 5: A Quick How-To: Leveraging BI Web Services to Deliver · PDF fileLeveraging BI Web Services to Deliver Data to Dashboards ... negating the need to dump the data to ... SAP HANA, mobility,

This screen allows you to select which objects from the report block you want to enable as filters. We will not use these in this example.

This screen actually creates the web service, since this is a completely new web service, we will need to choose “Create” in the bottom right. If this existed already, we would be able to select an existing one and choose to publish.

As stated before, this is a new web service so we need to name it. As I mentioned, make sure to make this name clearly related to what is being queried to make it clear to all users.

Page 6: A Quick How-To: Leveraging BI Web Services to Deliver · PDF fileLeveraging BI Web Services to Deliver Data to Dashboards ... negating the need to dump the data to ... SAP HANA, mobility,

Once published, you will be able to see the web services on the server you are using by clicking the blue globe on the left pane of Web Intelligence.

After selecting the appropriate web service, go down to the WSDL URL and select the drop down to the right and choose Copy to Clipboard.

Page 7: A Quick How-To: Leveraging BI Web Services to Deliver · PDF fileLeveraging BI Web Services to Deliver Data to Dashboards ... negating the need to dump the data to ... SAP HANA, mobility,

Step 3: Importing the WSDL into Dashboard Design’s Data Connections

Once you begin working with a new Dashboard, open the Data Manager (Ctrl+M)

Add a new Data Connection by clicking the “Add” drop down and choose Web Service Query (Query as a Web Service). Even though this is not something we created with QaaWS, this is the appropriate choice.

Page 8: A Quick How-To: Leveraging BI Web Services to Deliver · PDF fileLeveraging BI Web Services to Deliver Data to Dashboards ... negating the need to dump the data to ... SAP HANA, mobility,

In the WSDL URL section, paste in the URL you just copied to the Clipboard in Web Intelligence and click “Import”

Once a WSDL has been imported, make sure that you choose the correct Method. For our use case, and probably the most common one, choose the Method that begins with “GetReportBlock”

After choosing the correct method, the Input and Output Values sections below will populate, enabling you to set Input Values such as prompt values and additional parameters of the Web Service, and Output Values such as the Table Body, Header and Footer as well as other properties like User, Creator, Refresh Date, etc.

Page 9: A Quick How-To: Leveraging BI Web Services to Deliver · PDF fileLeveraging BI Web Services to Deliver Data to Dashboards ... negating the need to dump the data to ... SAP HANA, mobility,

For our example, we need to provide a prompt value for “Enter Year” which is the materialization of the “Year” query prompt we set when designing the Web Intelligence Document

Also found in the Input Values is the “Refresh” parameter. In order to have the query refresh , we will need to set this to TRUE. We mapped this to A1 where TRUE has been typed.

Page 10: A Quick How-To: Leveraging BI Web Services to Deliver · PDF fileLeveraging BI Web Services to Deliver Data to Dashboards ... negating the need to dump the data to ... SAP HANA, mobility,

Now on the Output Values side of the equation, we need to set where the Headers will be dropped into the Excel spreadsheet. To help me in design, I went ahead and typed something similar to what will be inserted into the cells in the M and N column and then mapped “Cell” under Headers -> Row to these two cells.

Above the Headers section of the Output Values lies the Table section. In the “Cell” field here, we need to map out the entire table. The use of “cell” is deceptive here as you need to actually select a range that is as wide and at least as tall as the table will be.

Page 11: A Quick How-To: Leveraging BI Web Services to Deliver · PDF fileLeveraging BI Web Services to Deliver Data to Dashboards ... negating the need to dump the data to ... SAP HANA, mobility,

Step 4: Configuring the Data Connection to work in the Dashboard as Desired For our simple example, we will use a List View to display the data and a Combo Box to select the year values for the prompt. For the List View, we should bind the “Display Data” to the area we mapped as “cell” from the Table in the Web Service Connection’s Output Values.

For the Combo Box to select the year, we should bind the labels to an area where we have typed in the eligible years to be used for a prompt, 2009-2013, and then select the Insertion Type to Row and map our Source Data to the same area containing the years and set the Destination to the same cell we set “Enter Year” to be in the Input Values of the Web Service connection.

Now that the two components we will use have been configured to interact with the underlying spreadsheet appropriately, we need to tell the data connection when to refresh. For this

Page 12: A Quick How-To: Leveraging BI Web Services to Deliver · PDF fileLeveraging BI Web Services to Deliver Data to Dashboards ... negating the need to dump the data to ... SAP HANA, mobility,

example, we want to see the sales and stores updated every time a user selects a new year from the Drop Down. To make this happen, we set the “Refresh Option” trigger cell to refresh on “When Value Changes” and set the trigger cell to be the cell that is both where we are inserting the year into from the drop down and where the web service looks for the prompt response.

Step 5: Action! With the connection and components configured, align your components how you would like them to appear on the canvas and save your Dashboard.

When you run the dashboard either in “Preview” or from the platform, experiment by selecting different years from the drop down menu at the top. In the three screen captures below, we work through selecting 2011, 2012 and then 2013 and watch how the values in Sales Revenue year by year.

Page 13: A Quick How-To: Leveraging BI Web Services to Deliver · PDF fileLeveraging BI Web Services to Deliver Data to Dashboards ... negating the need to dump the data to ... SAP HANA, mobility,

That’s how you use Web Services to deliver live data into your dashboard projects! Hopefully this content will assist you in designing your dashboards from now on!

Patrick Leonard, Business Intelligence Consultant Decision First Technologies [email protected] Twitter: @PleonardDFT

Patrick Leonard is a business intelligence consultant with Atlanta-based Decision First Technologies. He has worked on multiple full-life-cycle BI implementations, with expertise in the healthcare and utilities industries. He works extensively with dashboards, SAP HANA, mobility, and other data visualization tools. You can follow him on Twitter at @Pleonard_DFT.