Error when running Information links using On-Demand with more than 1000 values in TIBCO Spotfire version 11.4.0/11.4.1/10.10.5/10.10.6

Error when running Information links using On-Demand with more than 1000 values in TIBCO Spotfire version 11.4.0/11.4.1/10.10.5/10.10.6

book

Article ID: KB0073057

calendar_today

Updated On:

Products Versions
Spotfire Server 11.4.0,11.4.1,10.10.5 and 10.10.6

Description

Using TIBCO Spotfire Server version 11.4.0/11.4.1/10.10.5/10.10.6, if you run an On-Demand Information Link that has more than 1000 values as input, it will fail.  There are multiple different errors that you might get depending upon the Data Source template used, such as one of the following: 
 

  • InformationModelWebServiceException: Failed to execute query: An expression of non-boolean type specified in a context where a condition is expected, near ','
  • InformationModelServiceException at Spotfire.Dxp.Services:
    Failed to execute query: SQL compilation error:
    syntax error line 1 at position XXXXX unexpected ','. (HRESULT: 80131509)

The reason for this issue can be found in sql.log, where you can check the SQL that was generated for this on-demand Information Link.
The SQL that is generated for fetching the data is faulty and would be in this pattern:
WHERE
*(W1."ColumnName" IN (value1, value2, value3, ... 1000 values) OR value1,001 value 1002, value 1003, ....2000 values))

The correct SQL should have looked like this:    
WHERE
*(W1."ColumnName" IN (value1, value2, value3, ... 1000 values) OR W1."ColumnName" IN (value1,001 value 1002, value 1003, ....2000 values))


Note: If you have changed the setting max-in-clause-size (1000 by default) for your data source, you would see this issue occurring whenever you are trying to use more values than what you have set.    

Resolution

This is a known issue, introduced in TIBCO Spotfire Server version 11.4.0 and 10.10.5, and is currently scheduled to be addressed in a future release/service pack. 

For now, a workaround is to change the given two parameters in the Data Source Template. The Data Source template should correspond to the one with which you are facing issues while using the OnDemand feature.

The workaround is to change default given values to the suggested values in your desired Data Source template:

<max-in-clause-size>501</max-in-clause-size>
<condition-list-threshold>500</condition-list-threshold>

Note: This workaround would only work with the given two parameters already predefined in the Data Source Templates eg:  MSSQL, Oracle, etc. Adding them explicitly in a Data Source Template will not work.

Issue/Introduction

On-Demand data fails to load in a Spotfire analysis using Information Links when passing more than 1000 values.