Jump to content

change SQL of custom query through IronPython


asier b

Recommended Posts

  • 6 months later...

I've done something similar as follows:

from Spotfire.Dxp.Data import *

from Spotfire.Dxp.Data.Import import DatabaseDataSource

from Spotfire.Dxp.Data.Import import DatabaseDataSourceSettings

my_query = "select * from my_table"

my_settings = DatabaseDataSourceSettings("System.Data.Odbc", "DSN=myDSN", my_query)

my_source = DatabaseDataSource(my_settings)

Document.Data.Tables["myDataTable"].ReplaceData(my_source)

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...