Jump to content

Creating a new data table from markings using Spotfire Python


Chris Brawn

Recommended Posts

Following is a sample script reference,

from Spotfire.Dxp.Data import DataFlowBuilder

from Spotfire.Dxp.Data.Import import DataTableDataSource

from Spotfire.Dxp.Data import*

#source table name

tableName="SalesAndMarketing"

dt = Document.Data.Tables[tableName]

 

 

dataSelection=Document.ActiveMarkingSelectionReference

ds=DataTableDataSource(Document.Data.Tables[tableName],dataSelection)

dfb=DataFlowBuilder(ds,Application.ImportContext)

context = Document

 

flow=dfb.Build()

#add data table

Document.Data.Tables.Add("Output Table",flow)

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