> ## Documentation Index
> Fetch the complete documentation index at: https://docs.kinetica.com/llms.txt
> Use this file to discover all available pages before exploring further.

# create_table_request

> create_table_request — Kinetica Rust API

[gpudb\_api](https://docs.kinetica.com/content/api/rust/index.md)::<wbr />[generated](https://docs.kinetica.com/content/api/rust/generated/index.md)::<wbr />[api](https://docs.kinetica.com/content/api/rust/generated/api/index.md)::<wbr />[constants](https://docs.kinetica.com/content/api/rust/generated/api/constants/index.md)
[Source](https://github.com/kineticadb/kinetica-api-rust/blob/master/crates/gpudb-api/src/generated/api.rs#L27903)&#x20;

Constants for the fields of the `/create/table` request.

## Option fields

### `options`

Constants for `options`.

`pub const ALWAYS: &str = "always";`

Generate as much primary key index data as possible before accepting requests.

`pub const BUILD_PK_INDEX_POLICY: &str = "build_pk_index_policy";`

Set startup primary-key index generation scheme for the table.

`pub const CHUNK_COLUMN_MAX_MEMORY: &str = "chunk_column_max_memory";`

Indicates the target maximum data size for each column in a chunk to be used for this table.

`pub const CHUNK_MAX_MEMORY: &str = "chunk_max_memory";`

Indicates the target maximum data size for all columns in a chunk to be used for this table.

`pub const CHUNK_SIZE: &str = "chunk_size";`

Indicates the number of records per chunk to be used for this table.

`pub const COLLECTION_NAME: &str = "collection_name";`

\[DEPRECATED–please specify the containing schema as part of `table_name` and use `/create/schema` to create the schema if non-existent] Name of a schema which is to contain the newly created table. If the schema is non-existent, it will be automatically created.

`pub const COMPRESSION_CODEC: &str = "compression_codec";`

The default compression codec for this table’s columns.

`pub const CREATE_TEMP_TABLE: &str = "create_temp_table";`

If true, a unique temporary table name will be generated in the sys\_temp schema and used in place of `table_name`. If is\_result\_table is true, then this is always allowed even if the caller does not have permission to create tables. The generated name is returned in qualified\_table\_name.

`pub const FALSE: &str = "false";`

`pub const FOREIGN_KEYS: &str = "foreign_keys";`

Semicolon-separated list of foreign keys, of the format ‘(source\_column\_name \[, …]) references target\_table\_name(primary\_key\_column\_name \[, …]) \[as foreign\_key\_name]’.

`pub const FOREIGN_SHARD_KEY: &str = "foreign_shard_key";`

Foreign shard key of the format ‘source\_column references shard\_by\_column from target\_table(primary\_key\_column)’.

`pub const HASH: &str = "HASH";`

Use hash partitioning.

`pub const INTERVAL: &str = "INTERVAL";`

Use interval partitioning.

`pub const IS_AUTOMATIC_PARTITION: &str = "is_automatic_partition";`

If true, a new partition will be created for values which don’t fall into an existing partition. Currently only supported for list partitions.

`pub const IS_COLLECTION: &str = "is_collection";`

\[DEPRECATED–please use `/create/schema` to create a schema instead] Indicates whether to create a schema instead of a table.

`pub const IS_REPLICATED: &str = "is_replicated";`

Affects the distribution scheme for the table’s data. If true and the given type has no explicit shard key defined, the table will be replicated. If false, the table will be sharded according to the shard key specified in the given `type_id`, or randomly sharded, if no shard key is specified. Note that a type containing a shard key cannot be used to create a replicated table.

`pub const IS_RESULT_TABLE: &str = "is_result_table";`

Indicates whether the table is a memory-only table. A result table cannot contain columns with text\_search data-handling, and it will not be retained if the server is restarted.

`pub const LAZY: &str = "lazy";`

Generate the necessary primary key index data at start, and load the remainder lazily.

`pub const LIST: &str = "LIST";`

Use list partitioning.

`pub const LOAD_VECTORS_POLICY: &str = "load_vectors_policy";`

Set startup data loading scheme for the table.

`pub const NO_ERROR_IF_EXISTS: &str = "no_error_if_exists";`

If true, prevents an error from occurring if the table already exists and is of the given type. If a table with the same ID but a different type exists, it is still an error.

`pub const ON_DEMAND: &str = "on_demand";`

Generate primary key index data as requests use it.

`pub const PARTITION_DEFINITIONS: &str = "partition_definitions";`

Comma-separated list of partition definitions, whose format depends on the choice of partition\_type. See range partitioning, interval partitioning, list partitioning, hash partitioning, or series partitioning for example formats.

`pub const PARTITION_KEYS: &str = "partition_keys";`

Comma-separated list of partition keys, which are the columns or column expressions by which records will be assigned to partitions defined by partition\_definitions.

`pub const PARTITION_TYPE: &str = "partition_type";`

Partitioning scheme to use.

`pub const RANGE: &str = "RANGE";`

Use range partitioning.

`pub const SERIES: &str = "SERIES";`

Use series partitioning.

`pub const STRATEGY_DEFINITION: &str = "strategy_definition";`

The tier strategy for the table and its columns.

`pub const SYSTEM: &str = "system";`

Generate primary key index data using the system-configured default.

`pub const TRUE: &str = "true";`

`pub const TTL: &str = "ttl";`

Sets the TTL of the table specified in `table_name`.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.