TSTool / Command / NewTable
Overview
The NewTable
command creates a table with named columns,
each of which contains data of a specified data type.
Common uses for tables are:
- hold tabular data from files, databases, web services
- facilitate conversion of data between tables and time series
- hold analysis results information such as statistics for time series and data check warnings
- commands like
CalculateTimeSeriesStatistic
can add information to tables.
- commands like
- simple "flat" data representation that can be output be written as final data products or artifacts of processing
Characteristics of the table are as follows:
- Each column can only contain a single data type
- special values such as null and
NaN
are generically handled - arrays of a data type can also be stored in columns, although full support is limited
- special values such as null and
- The default precision for numbers for display and output is 2 digits after the decimal – additional formatting features may be available in write commands and may be added later
- Tables are referenced using the
TableID
parameter - Cells in tables are referenced using the column name and cell values that identify rows (such as location or time series identifiers)
Command Editor
The following dialog is used to edit the command and illustrates the command syntax.
NewTable
Command Editor (see also the full-size image)
Command Syntax
The command syntax is as follows:
NewTable(Parameter="Value",...)
Command Parameters
Parameter | Description | Default |
---|---|---|
TableID required |
Identifier for the table – should be unique among tables that are defined. Can be specified using processor ${Property} . |
None – must be specified. |
Columns |
The column names and data types are defined using the format ColumnName1,DataType1;ColumnName2,DataType2 . Column names can contain spaces; however, simple short names without spaces are generally handled better by display features and minimize errors in referencing the columns. Data types are specified using the following strings:
If arrays are used, indicate the data type in square brackets, for example ColumnName1,[double] . |
No columns will be defined. |
Examples
See the automated tests.
Troubleshooting
See Also
FreeTable
command