A js type for operating on input tables.

Represents a User Input Table, which can have data added to it from other sources.

You may add rows using dictionaries of key-value tuples (representing columns by name), add tables containing all the key/value columns to add, or delete tables containing the keys to delete. Each operation is atomic, and will either succeed completely or fail completely. To guarantee order of operations, apply an operation and wait for the response before sending the next operation.

Each table has one or more key columns, where each unique combination of keys will appear at most once in the table.

To view the results of the Input Table, you should use standard table operations on the InputTable's source Table object.

Hierarchy

  • InputTable

Constructors

Accessors

  • get keyColumns(): Column[]
  • A list of the key columns.

    Returns Column[]

    Column array.

  • get keys(): string[]
  • A list of the key columns, by name

    Returns string[]

    String array.

  • get table(): Table
  • The source table for this Input Table

    Returns Table

    dh.table

  • get valueColumns(): Column[]
  • A list of the value Column objects

    Returns Column[]

    dh.Column array.

  • get values(): string[]
  • A list of the value columns, by name

    Returns string[]

    String array.

Methods

  • Adds a single row to the table. For each key or value column name in the Input Table, we retrieve that javascript property at that name and validate it can be put into the given column type.

    Parameters

    • row: {
          [key: string]: any;
      }
      • [key: string]: any
    • Optional userTimeZone: string

    Returns Promise<InputTable>

    Promise of dh.InputTable

  • Add multiple rows to a table.

    Parameters

    • rows: {
          [key: string]: any;
      }[]
    • Optional userTimeZone: string

    Returns Promise<InputTable>

    Promise of dh.InputTable

  • Add an entire table to this Input Table. Only column names that match the definition of the input table will be copied, and all key columns must have values filled in. This only copies the current state of the source table; future updates to the source table will not be reflected in the Input Table. The returned promise will be resolved to the same InputTable instance this method was called upon once the server returns.

    Parameters

    Returns Promise<InputTable>

    Promise of dh.InputTable

  • Add multiple tables to this Input Table.

    Parameters

    Returns Promise<InputTable>

    Promise of dh.InputTable

  • Deletes an entire table from this Input Table. Key columns must match the Input Table.

    Parameters

    Returns Promise<InputTable>

    Promise of dh.InputTable

  • Delete multiple tables from this Input Table.

    Parameters

    • tablesToDelete: Table[]

    Returns Promise<InputTable>