Skip to Main Content
Spotfire Ideas Portal
Status Future Consideration
Product Spotfire
Categories Data Access
Created by Guest
Created on Aug 10, 2017

Ability to output parameter value as-is without single or double quotes

Check the following use cases of that scenario:

  1. Very often template developers need ability to add custom-built expressions to queries in FROM, WHERE and ORDER BY parts.
  2. Multi-tenancy for templates: one set of template/IL/DS can be used for different databases or schemas.

 

Possible syntax:

?Param - regular output

?!Param - outputs without quotes

 

Custom-built expressions:

Assume your filter can be filtered by one column or another column or both.

In that case you will have to write really bad filter expression in IL.

Instead you can write WHERE expression in Python and then supply it as-is to the query.

Query will execute much faster, because it can use indexes.

 

Next to it is ORDER BY. Users often want to be able to sort data differently.

We can write in Python code ORDER BY expression and supply it to the query.

Query will execute much faster, because it can use indexes.

 

Workaround:

There is a thing call "FilterExpression" which allows to do something similar, but it will always go to <conditions>.

 

Multi-tenancy:

Assume you have data for different engagements in different databases or schemas.

Currently you have to create a copy of data source, information link and a template.

Which brings HUGE set of problems.

 

We can use "Open session command" of the data source like this:

"USE ?!Database;"

Or we can use database name in queries

"SELECT * FROM ?!Schema.Table WHERE <conditions>"

 

 

Workaround:

We have to implement custom JDBC driver (!) to achieve that goal.

Driver handles incorrect syntax and it make it correct.

This is completely undocumented area.

  • Attach files
  • Guest
    Reply
    |
    Aug 21, 2017

    This almost exists for information links - you can set up a parameter as a "Raw" type which inserts the values directly without quotes. The problem is that setting the parameter only works through parameters passed via configuration blocks - you can't link parameters to document properties as the "raw" type confuses properties. This also means that the capability doesn't work for on-demand information links since they have to take values from places like document properties.