On-Demand Temp Table creation may fail for some Data Source types due to NULL in the column_list

On-Demand Temp Table creation may fail for some Data Source types due to NULL in the column_list

book

Article ID: KB0078578

calendar_today

Updated On:

Products Versions
Spotfire Server All versions

Description

Working with Information Services Data Source templates, for the create-temp-table command used to create temporary tables, the default format for the $$column_list$$ is ("VALUE" INTEGER NULL) for an integer value. If the particular data source does not support this use of NULL (an example of this is TEIID, which defaults to NULL and only accepts the option NOT NULL), then a sql-filter can be used to remove the NULL.

Issue/Introduction

The create-temp-table command fails for Information Services Data Sources which do not support the default NULL value included in the $$column_list$$

Resolution

A custom sql-filter class could be written, but since a class already exists that does exactly this for the SAS/SHARE data source that is included out-of-the-box with Spotfire, that existing sql-filter class - com.spotfire.ws.im.ds.sql.sassharenet.SASSQLFilter - can be reused in the following way:
  
  1. Start the TIBCO Spotfire Server Configuration Tool.
  2. Under the Configuration Tab, select Data Source Templates, and then the particular Data Source Template you want to edit  
  3. Now add the custom sql-filter to the Data Source template, by adding the following row anywhere within the <jdbc-type-settings> section:

    <sql-filter>com.spotfire.ws.im.ds.sql.sassharenet.SASSQLFilter</sql-filter>

    The end result should look something like this:
    Data Source Template example
  4. Save the configuration
  5. Restart the Spotfire Server
  6. Re-save any Data Source(s) that are using this template.