get_constituent
The get_constituent method returns a single constituent table according to the specified key column value(s). If there are no matching rows, the result is None. If there are multiple matching rows, a DHError is thrown.
Syntax
Parameters
| Parameter | Type | Description |
|---|---|---|
| key_values | Union[Any, Sequence[Any]] | The values for key column(s) to match. |
Returns
The specified constituent table, or None.
Examples
The following example creates a source table and then partitions it by the Key column. The partitioned table's unique keys are 1, 2, and 3. The constituent table with the key 2 is then grabbed via get_constituent.
The following example creates a source table and then partitions it by the Key1 and Key2 columns. The result table is then created via get_constituent, where Key1 is 0 and Key2 is 2.