TIBCO Spotfire:A Comprehensive Primer(Second Edition)
上QQ阅读APP看书,第一时间看更新

Publishing the dashboard to Spotfire Web

One of the key aspects of Spotfire is that it is very straightforward to publish an analysis to the web so that it can be consumed by many more users than just you or your immediate team members.

Note that if you are using a Spotfire Web client to author your analysis, saving the file online saves it directly to the Spotfire library, so you have already published it (if permissions are set correctly)!

However, if you are using a Spotfire Analyst client, it's a really simple matter to publish it for use by Spotfire Consumer users. This makes it available to a wider audiencepotentially hundreds or thousands of users. Many Spotfire users even expose their analyses to the internet!

The following example of publishing an analysis applies to Spotfire Analyst and requires that you have a Spotfire web deployment up and running. This could be a Spotfire Cloud instance or an on-premises installation of Spotfire. If you do not have anywhere available where you can publish the analysis, please do still read through the example, as it may provide you with food for thought if you should want to scale up the use of Spotfire in your organization in the future.

Let's deploy the analysis now:

  1. If you are not online to a Spotfire server, please close Spotfire and reopen it, logging in to a server that you have access to. You can tell if you are online by checking the globe icon in the toolbar:
  1. From the File menu, choose Save AsLibrary item...:
  1. Spotfire's library browser will open by way of a File, Save As dialog:
Spotfire's library is its in-built file store. It has already been mentioned in the earlier chapters of this book. The library is stored on the Spotfire server and is shared by all users that use the particular server. The folders have a sophisticated permissions model and can store Spotfire analysis files, data files, database connections, information links (for Spotfire's database abstraction model), and more.

Notice that the library browser has opened at the root (highest level) of the library in my case. It's a good idea to have a well-thought-out folder structure within the library, so let's create a new folder for our dashboard.

Do you have the right permissions to save in th e library? If your server is managed centrally, you may already be provided with a folder in which you can save your analysis. If you don't have a suitable folder, or the permissions to save to the library, then please contact the administrator of the server asking for the requisite permissions!

  1. Click the New Folder... button (note that you may need to move to a lower level folder within the library for which you have write permissions). We will cover what happens if you try to save to a folder in which you do not have permissions.
  2. Enter the Name of the folder. In my case, I have chosen to name it Sample Dashboards:
  1. Click OK on the dialog.
  2. The Spotfire library browser will open the new folder you have created.
    Before we go any further—did you notice the Data loading settings warning at the bottom of the Save as | Library item... dialog?
It's important to heed the warning! In Chapter 1, Welcome to Spotfire, it was discussed that if you do not embed the data in your Spotfire analysis file, any user that doesn't have access to the original source data will not be able to open it. In this case, we have loaded data from CSV files, so it's unlikel y that your intended users will have access to the CSV files that were used to create the dashboard. Let's fix that now!
  1. Click Review or edit settings.
  2. In the dialog that pops up, update the data table settings to match the settings I have used here:

I have chosen New data when possible. This means that if the file exists, it will be reloaded/updated when you load the file. Otherwise, Spotfire will use the stored (embedded) data in the analysis.

Remember that we loaded a single data table by joining multiple files. If the files were loaded as separate data tables and joined them afterwards, this option will always re-execute the join when the dashboard is opened. Of course, this has a performance penalty and is something to consider when handling large data volumes, but it could be useful in order to keep various parts of the data up to date—you could have a static data table joined to another table that changes frequently, for example.

It's important to notice that any updated data files will not be reloaded automatically UNLESS they are in exactly the same folder that you originally loaded them from. This means that another user would have to specify the data file locations if they wished to update the dashboard with new data.

Now that the warning has been dealt with, let's go ahead and save the file!

  1. Choose a filename and click Next > on the dialog.
  2. The dialog will now enable you to enter a description and some keywords. These are optional, but I have filled in some examples:
  1. Click Finish.
Spotfire will save the file to the library.  That's all it takes to publish an analysis to the Spotfire web client so that it can be opened by a Spotfire consumer.

Let's take a quick look at this dialog—there are some useful functions herein:

You can see the location of the file in the librarythe first link that's shown is just the path of the file. You can use this to open the file using Spotfire Analyst.

The second link is the link to the analysis within the Spotfire web interface.

The third option is to send an email to notify other users about the analysis.

Try clicking the second linka web browser should open up that shows the dashboard:

Now, check the property control that was created in the previous exampledoes the KPI chart update to show whatever is selected? If so, congratulations! You have successfully created and deployed your first Spotfire dashboard, and it is available for other users to consume (if the permissions have been set correctly).