Jump to content

How to dynamically switch sql connections between environments

Oleg Denisov

Recommended Posts


I was unable to find a proper way to have one dashboard in Spotfire 10.3 where I can switch between 3 SQL Server environments (DEV, UAT, PROD).

Say I have one table called dbo.Log_Analysis in all 3 environments with the same field structure, which technically are 3 differen sql connections. Instead of having 3 different data tables in my dashboard I want only one that can be replaced depending on which of the 3 environments I chose (i.e. through a drop down selector).

I have found this useful code piece on how to replace a data able with a query from a sql connection:https://community.spotfire.com/questions/script-replacing-data-tables-sql-s...

Do I create 3 different scripts that point to the different environments and how do I then put them all into a dropdown selector


Link to comment
Share on other sites

Hi Godwyn,

You could indeed use this script to set the data source connection of a data table. I guess the easiest way for now (maybe not what you prefer), is to create 3 scripts and 'catch' them in a text area with 3 different buttons.

I cannot really see (yet) how you would be able to setup a dropdown list using the three scripts as input parameters.

Kind regards,


Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Create New...