As a transitional step, this site will temporarily be made Read-Only from July 8th until the new community launch. During this time, you can still search and read articles and discussions.
While the community is read-only, if you have questions or issues requiring TIBCO review/response, please access the new TIBCO Community and select "Ask A Question."
You will need to register or log in or register to engage in the new community.
Writing to files and databases from Spotfire
Spotfire can write back to a database in different ways using different techniques such as IronPython from a Text Area, Information Links or Data Functions. It can also be as complex as creating a custom extension using the Spotifre SDK. It can write back to different databases such as text files, excel, relational databases or even cloud.
Writing back using IronPython
IronPython is very powerful as is possible to do almost anything that can be done with .NET as IronPython is a Python implementation of the .NET framework. Along with the Spotfire API it is possible to write to files, export images, create pdf documents, automate windows task and write to databases.
Writing back using Data Functions
Data functions are as powerful as ironpython, but these serve a different purpose and can be written in Python or R programming language. There are packages for almost anything. Data functions are commonly used by Data Scientists to perform complex calculations. Writing back to files or databases using Data Functions is another way to achieve this.
Writing back using Information Links
Information links are predefined database queries. They require Java Drivers (JDBC) on the server to create data connections. Writing back using information links can be a handy tool to execute queries before or after the data is loaded or executing complex database queries using stored procedures. One great advantage of using Informaton Links is the hability to pass parameters from markings or document properties.
Write to files
- Text file (IronPython/StreamWriter) - basic example
- Excel (IronPython/ODBC) - basic example
- SQL Lite (Python Data Function/sqlite3) - complete example
- Export cross table to memory as a data table (IronPython/StreamWriter) - basic example
- MS Access (IronPython / OleDbConnection) - basic example
- Export Spotfire Binary Data Files (sbdf) - the first part covers exporting data to sbdf
- Write to PDF - exports the current page to PDF
- Write to bitmap images - writes an image file from a visualization
Write to server databases
- MS SQL (IronPython/.net System.Data.SQLClient) - basic example
- MS SQL (IronPython/.net System.Data.SQLClient) - inserts a column and updates data
- Write to SQL Server (IronPython/ODBC) - basic example
- Insert data to PostgreSQL with Information Links - modified SQL/stored procedures
- Insert data to PostgreSQL using R Data Function - ODBC dsn
Write to Cloud
- Write to Google Sheets (Python Data Function example)
- Write to Google Big Query (Python Data Function)