Jump to content

Recommended Posts

Posted

Hi,

I was wondering if anyone had used Python to build a table from selected Markings I can't see anything on the forum, I was wondering if I'd missed an article on it

Thank You

Posted

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)

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