Creates a new projection of an existing table. A projection represents a subset of the columns (potentially including derived columns) of a table.
For projection details and examples, see Projections. For limitations, see Projection Limitations and Cautions.
Window functions, which can perform operations like moving averages, are available through this endpoint as well as Get Records by Column.
A projection can be created with a different shard key than the source table. By specifying shard_key, the projection will be sharded according to the specified columns, regardless of how the source table is sharded. The source table can even be unsharded or replicated.
Name | Type | Description | ||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
table_name | string | Name of the existing table on which the projection is to be applied. | ||||||||||||||||||||||||||||
projection_name | string | Name of the projection to be created. Has the same naming restrictions as tables. | ||||||||||||||||||||||||||||
column_names | array of strings | List of columns from input parameter table_name to be included in the projection. Can include derived columns. Can be specified as aliased via the syntax 'column_name as alias'. | ||||||||||||||||||||||||||||
options | map of string to strings | Optional parameters. The default value is an empty map ( {} ).
|
Name | Type | Description |
---|---|---|
projection_name | string | Value of input parameter projection_name. |