Skip to content

TSTool / Command / NewTable


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
  • 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
  • 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:


Command Parameters

Parameter             Description Default          
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:
  • boolean - holds true or false
  • datetime – date and optionally time, consistent with TSTool date/time
  • double – double precision number (max value 1.7976931348623157E308)
  • float – single precision number (-2E63 to 2E63 - 1)
  • integer – integer (-2147483648 to 2147483647)
  • long - long integer (-9,223,372,036,854,775,808 to 9,223,372,036,854,775,807)
  • short – short integer (-32768 to 32767)
  • string – Unicode string

If arrays are used, indicate the data type in square brackets, for example ColumnName1,[double].
No columns will be defined.


See the automated tests.


See Also