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 |
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. |
[ transformationsOperations ]
|
Array.<OperationDefinition> ▼ | Array of operations. |
[].item
|
Array.<AddedTransformationDefinition> ▼ | Array of data transformations. |
[].type
|
SpotfireDataTransformationTypes ▼ | The type of the transformation. |
replaceColumn
|
String | Transformation used to replace an existing column with a calculated column. See |
addCalculatedColumn
|
String | Transformation used to create a new calculated column. See |
renameColumns
|
String | Transformation used to change the name of a set of columns according to an expression. See |
changeDataType
|
String | Transformation used to change the DataType of one or more columns. See |
dataFunction
|
String | Transformation using a previously registered data function. See |
excludeColumns
|
String | Transformation used to exclude a set of columns. See |
filterRows
|
String | Transformation used to only keep the rows that match a given expression. See |
pivot
|
String | Transformation used to pivot tall-skinny data into short-wide data. See |
replaceSpecificValue
|
String | Transformation used to replace values on specific rows, or on a single specific row. See |
replaceValues
|
String | Transformation used to replace all values in a column that match a given value. See |
unpivot
|
String | Transformation used to unpivot short-wide data into tall-skinny data. See |
[].description
|
Object | The description of the transformation to be added (see the methods set<TransformationType> of |
[ properties ]
|
Array.<DataTablePropertyDefinition> ▼ | Array of data table properties. |
[].name
|
String | |
[].value
|
string | boolean | number |
Members
addedColumns
dataTableName
extension
filePath
importedDataAsColumns
importedDataAsRows
informationLink
properties
transformationsOperations
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 |
setTransformationsOperations(operationsDefinitionsArray)
Set the list of operations of transformations definition.
Parameters:
Name | Type | Description |
---|---|---|
operationsDefinitionsArray
|
Array.<OperationDefinition> ▼ | The list of the operations of transformations description. |
[].item
|
Array.<AddedTransformationDefinition> ▼ | Array of data transformations. |
[].type
|
SpotfireDataTransformationTypes ▼ | The type of the transformation. |
replaceColumn
|
String | Transformation used to replace an existing column with a calculated column. See |
addCalculatedColumn
|
String | Transformation used to create a new calculated column. See |
renameColumns
|
String | Transformation used to change the name of a set of columns according to an expression. See |
changeDataType
|
String | Transformation used to change the DataType of one or more columns. See |
dataFunction
|
String | Transformation using a previously registered data function. See |
excludeColumns
|
String | Transformation used to exclude a set of columns. See |
filterRows
|
String | Transformation used to only keep the rows that match a given expression. See |
pivot
|
String | Transformation used to pivot tall-skinny data into short-wide data. See |
replaceSpecificValue
|
String | Transformation used to replace values on specific rows, or on a single specific row. See |
replaceValues
|
String | Transformation used to replace all values in a column that match a given value. See |
unpivot
|
String | Transformation used to unpivot short-wide data into tall-skinny data. See |
[].description
|
Object | The description of the transformation to be added (see the methods set<TransformationType> of |