Various methods to use XML as a datasource in Spotfire

Various methods to use XML as a datasource in Spotfire

book

Article ID: KB0081884

calendar_today

Updated On:

Products Versions
Spotfire Analyst All supported versions

Description

Spotfire cannot use XML as a datasource out-of-the-box. It only works with a table-based structure as input such as a CSV-file, Excel-file, a database table, etc. The XML always needs to be converted into a table like structure first. Listed below are some of the options to consider.
 

Issue/Introduction

Various options available in Spotfire to read XML files.

Resolution

You may use one of the following approaches:

* Script - Use a Python script (needs to be aware of the schema of the XML) to produce, e.g., a CSV file or insert data into a database table.

* SQL/XML query - If the XML data is already in a database, use a SQL/XML query that produces as output a "regular", XML-free table (or use a view definition).

*Custom Extension -  Extend Spotfire to create a custom data source that parses the XML. The data source would need to be schema-aware or configurable.  TIBCO Spotfire SDK contains an example to create a custom data source which can be used as a reference (SDK\Examples\Extensions\SpotfireDeveloper.CustomDataSourceExample).

*TIBCO Spotfire Advanced Data Services - Use TIBCO Spotfire Advanced Data Services (ADS). Additional licensing will be required to use this product. ADS can produce a table-like structures suitable for consumption in Spotfire. 

Additional Information

TIBCO ADS Reference :
https://docs.tibco.com/emp/spotfire_advanced_data_services/7.0.2/doc/html/onlinedocs/wwhelp/wwhimpl/js/html/wwhelp.htm#href=Ch_6_File_DataSources.021.11.html