How to use "Spotfire Library" node in Statistica to export a spreadsheet to Spotfire server library as a Spotfire SBDF file?

How to use "Spotfire Library" node in Statistica to export a spreadsheet to Spotfire server library as a Spotfire SBDF file?

book

Article ID: KB0070376

calendar_today

Updated On:

Products Versions
Spotfire Statistica 14.0.0 and later

Description

How to use "Spotfire Library" node in Statistica to export a spreadsheet to Spotfire server library as a Spotfire SBDF file?

Issue/Introduction

How to use "Spotfire Library" node in Statistica to export a spreadsheet to Spotfire server library as a Spotfire SBDF file?

Environment

Windows

Resolution

Starting from Statistica version 14.0.0, there is a workspace node named "Spotfire Library" which gives the ability to upload a Statistica Spreadsheet to a Spotfire Server Library as a Spotfire SBDF file.

With a Statistica workspace as active window, user can find the "Spotfire Library" node under Statistica menu "Data >> Export Data >> Spotfire Library".

User-added image

The Spotfire Library Node parameter dialog has below options:
------------------------------------------
The Destination:
1) Path = Unix-like file path including the name of where to upload the Spreadsheet. The name can have the .sbdf extension or not. Spotfire knows whether the file on the server is an SBDF file regardless of whether it has the .sbdf extension.
2) Overwrite if exists = flag to whether to overwrite the existing file. An error will occur if the file exists on the server and this flag is not set

The Server Settings:
3) Server URL = URL to the server starting with http:// or https://, servername, and optional port number.
4) Client ID = client ID obtained when registering an upload client
5) Secret = secret obtained when registering an upload client
6) Ignore SSL certificate errors = flag to ignore SSL certificate errors. When getting self-signed certificates, sometimes the signature is not trustworthy. However, if a user is receiving errors, and he trusts the server, setting this flag can stop errors being shown and stopping the upload
7) Debug output = provides debugging output to the console output of the node
------------------------------------------

Please take note that, the " Client ID" and " Secret" are NOT your Username and password for your Spotfire server.

Before being able to use "Spotfire Library" node, a user with administrator privileges on a Spotfire server would first need to Register an API upload client with the Spotfire server to get the upload client credentials ("ClientID" and "Secret").

To do this,

a) Go to your Spotfire server, Start a command prompt (cmd.exe) as Administrator (of the machine)

b) In the command prompt window, route to your Spotfire tomcat spotfire-bin folder where config.bat tool resides (eg. C:\tibco\tss\10.3.0\tomcat\spotfire-bin)

c) run the register-api-client command with the config tool of your Spotfire server: 
-----------------
C:\tibco\tss\10.3.0\tomcat\spotfire-bin>config.bat register-api-client -Sapi.rest.library.upload -n Christmas
-----------------
"Christmas" is just a random name used to register the API client. You can give your own upload client id to replace "Christmas" in above command.
(Here is a reference: https://community.spotfire.com/articles/spotfire/rest-api-upload-sbdf-files-spotfire-library/)

d) With the command, You will be prompted for password of your Spotfire config tool.  Enter your Spotfire config tool password. 
The output would be similar to below:
-------------------
Successfully registered a new API client with the display name 'Christmas':
Client ID: 2cc2590bxxxxxxxxxxxxxxxxxxxxxx51c26f08b2.oauth-clients.spotfire.tibco.com
Client secret: 4eb5f726fe90a06ffxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx24b9bcb04
------------------- 

You would need to record down this Client ID and Client Secret for Spotfire Library node usage. 

e) In your Spotfire server, add this upload client ID to be a member of Library Administrator so that they have permission to upload files to Spotfire library. 
You can go to your Spotfire Server Admin UI "Users and Groups" to check if the client ID is a member of "Library Administrator". 

User-added image

f) In the Statistica "Spotfire Library" node, enter above Client ID and Secret, your Spotfire Server URL (you need to add the port number if you are using a port different from 80), and your Spotfire library file path ( the file path includes the name of where to upload the Spreadsheet. The name can have the .sbdf extension or not.)

User-added image

You will then be able to execute the Spotfire Library node in Statistica and publish Statistica spreadsheet to Spotfire server library as Spotfire SBDF files.