TableDefinitionLike

A TableDefinitionLike is an alias for a superset of objects that can be used to define a table in Deephaven. There are a slew of features that accept a TableDefinitionLike as an input argument, including (but not limited to):

Objects

Four different objects meet the definition of a TableDefinitionLike:

  • TableDefinition

A TableDefinition is an object that defines the mapping between column names and column definitions.

  • Mapping[str, DType]

A Mapping is a dictionary-like object that maps column names to their data types. The keys are the column names, and the values are Deephaven's dtypes.

  • Iterable[ColumnDefinition]

An iterable is an object that can be iterated over, such as a list or a tuple. It contains ColumnDefinition objects, which define the columns of the table.

  • JType

A JType is a Java type that can be used to define the definition of a table. This object covers equivalent Java types that can be used here in conjunction with jpy.

Examples

The following example gets a TableDefinition from a table using its definition attribute:

The following example constructs a Mapping of column names to their data types, which meets the TableDefinitionLike definition:

The following example constructs an iterable of ColumnDefinition objects, which meets the TableDefinitionLike definition: