Class

SpotfireDataTable

SpotfireDataTable(dataTableDescription)

Represents a data table in the SpotfireDocumentEditor state to be created when calling applyState.

Constructor

new SpotfireDataTable(dataTableDescription)

Parameters:
Name Type Description
dataTableDescription DataTableDescription
name String

The name of the data table.

[ fromUrl ] String

The URL of the source.

[ sourceExtension ] String

The extension of the source file.

[ fromLibrary ] String

The Spotfire library path of the source.

[ fromInformationLink ] String

The information link to be used to load the data table.

[ informationLinkParameters ] String

The parameters of the information link.

[ addedColumnsDefinitions ] Array.<AddedColumnsDefinition>

Array of columns to add (calculated column, etc ...).

[].type SpotfireDataColumnsTypes

The type of the column to add from enum SpotfireDataColumnsTypes.

calculatedDataColumn String

Calculated data column type.

hierarchyDataColumn String

Hierarchy data column type.

[].name String

The name of the column to add.

[].expression String

The expression to be used to calculate the column.

[].levels String

The columns to be used as levels to create the hierarchy.

[ importedDataAsColumns ] Array.<ImportedDataAsColumnDefinition>

Array of columns to import.

[].urlSource String

The URL of the source containing the columns to be imported.

[].dataTableTarget String

The name of the data table in which new columns will be imported.

[].targetIdColumn String

The name of the column in the target data table to use for the matching.

[].sourceIdColumn String

The name of the column in the source data table to use for the matching.

[ [].sourceExtension ] String

The extension of the source file.

[ [].otherColumnsMatching ] Array.<ColumnMatching>

Array of the description of other column matches.

[].targetColumn String

The name of the column in the target data table to use for the matching.

[].sourceColumn String

The name of the column in the source data table to use for the matching.

[ [].replaceCommonColumns = false ] Boolean

Specifies whether the columns in the target data table should be replaced by the imported columns if they are common. Otherwise, the name of imported columns will be indexed.

[].columnsToReplace Array.<String>

Columns to be replaced by the imported data.

[ importedDataAsRows ] Array.<ImportedDataAsRowDefinition>

Array of rows to import.

[].urlSource String

The URL of the source containing the columns to be imported.

[].dataTableTarget String

The name of the data table in which new rows will be imported.

[ [].ignoredColumn ] Array.<String>

The list of columns to be ignored during importation.

[ [].rowSourceColumn ] String

The column that identifies the origin of the row.

[ [].rowSourceValue ] String

The value that identifies the source of the row from the imported source.

[ [].originalRowSourceValue ] String

The value that identifies the source of the row from the target data table.

[ [].mappings ] Array.<ColumnMatching>

The list of columns to map between imported rows to existing rows. If not set, all common columns are merged. If set, common columns will be created with an indexed name.

[].targetColumn String

The name of the column in the target data table to use for the matching.

[].sourceColumn String

The name of the column in the source data table to use for the matching.

[ properties ] Array.<DataTablePropertyDefinition>

Array of data table properties.

[].name String
[].value string | boolean | number

Members

Array.<Object>

addedColumns

String

dataTableName

String

extension

String

filePath

Array.<Object>

importedDataAsColumns

Array.<Object>

importedDataAsRows

String

informationLink

Array.<InformationLinkParameter>

informationLinkParameters

Array.<Object>

properties

String

url

Methods

setAddedColumns(columnDefinitionsArray)

Set or update a definition of column to add for the applyState

Parameters:
Name Type Description
columnDefinitionsArray Array.<Object>

array of columns description to be added

[].name String

the name of the column to be added.

[].type String

the type descriptor of the column to be added.

[ [].expression ] String

Mandatory for SpotfireDataColumnTypes.calculatedDataColumn. Define the expression to calculate the value

[ [].isFrozen = false ] Boolean

set if the calculated column is frozen or not

[ [].levels ] String

Mandatory for SpotfireDataColumnTypes.hierarchyDataColumn. Define the column to use as levels

setImportedDataAsColumns(importedColumnsDefinitionsArray)

Set the list of imported data as columns definition.

Parameters:
Name Type Description
importedColumnsDefinitionsArray Array.<ImportedDataAsColumnDefinition>

The list of the import description.

[].urlSource String

The URL of the source containing the columns to be imported.

[].dataTableTarget String

The name of the data table in which new columns will be imported.

[].targetIdColumn String

The name of the column in the target data table to use for the matching.

[].sourceIdColumn String

The name of the column in the source data table to use for the matching.

[ [].sourceExtension ] String

The extension of the source file.

[ [].otherColumnsMatching ] Array.<ColumnMatching>

Array of the description of other column matches.

[].targetColumn String

The name of the column in the target data table to use for the matching.

[].sourceColumn String

The name of the column in the source data table to use for the matching.

[ [].replaceCommonColumns = false ] Boolean

Specifies whether the columns in the target data table should be replaced by the imported columns if they are common. Otherwise, the name of imported columns will be indexed.

[].columnsToReplace Array.<String>

Columns to be replaced by the imported data.

setImportedDataAsRows(importedRowsDefinitionsArray)

Set the list of imported data as rows definition.

Parameters:
Name Type Description
importedRowsDefinitionsArray Array.<ImportedDataAsRowDefinition>

The list of the import description.

[].urlSource String

The URL of the source containing the columns to be imported.

[].dataTableTarget String

The name of the data table in which new rows will be imported.

[ [].ignoredColumn ] Array.<String>

The list of columns to be ignored during importation.

[ [].rowSourceColumn ] String

The column that identifies the origin of the row.

[ [].rowSourceValue ] String

The value that identifies the source of the row from the imported source.

[ [].originalRowSourceValue ] String

The value that identifies the source of the row from the target data table.

[ [].mappings ] Array.<ColumnMatching>

The list of columns to map between imported rows to existing rows. If not set, all common columns are merged. If set, common columns will be created with an indexed name.

[].targetColumn String

The name of the column in the target data table to use for the matching.

[].sourceColumn String

The name of the column in the source data table to use for the matching.

setProperties(arrayOfProperties)

Set the list of properties to be added to the data table.

Parameters:
Name Type Description
arrayOfProperties Array.<Object>

the list of properties to be added

[].name String

the name of the property to be added

[].value String | Boolean | Number

the value of the property to be added