A set of parameters for GPUdb::createTable. More…
#include <gpudb/protocol/create_table.h>
Public Member Functions | |
| CreateTableRequest () | |
| Constructs a CreateTableRequest object with default parameters. | |
| CreateTableRequest (const std::string &tableName_, const std::string &typeId_, const std::map< std::string, std::string > &options_) | |
| Constructs a CreateTableRequest object with the specified parameters. | |
Public Attributes | |
| std::string | tableName |
| Name of the table to be created, in [ schema_name. ]table_name format, using standard name resolution rules and meeting table naming criteria. | |
| std::string | typeId |
| The type for the table, specified as either an existing table’s numerical type ID (as returned by GPUdb::createType) or a type definition (as described above). | |
| std::map< std::string, std::string > | options |
| Optional parameters. | |
Detailed Description
A set of parameters for GPUdb::createTable.
Creates a new table with the given type (definition of columns). The type is specified in typeId as either a numerical type ID (as returned by GPUdb::createType) or as a list of columns, each specified as a list of the column name, data type, and any column attributes.
Example of a type definition with some parameters:
Each column definition consists of the column name (which should meet the standard column naming criteria), the column’s specific type (int, long, float, double, string, bytes, or any of the properties map values from GPUdb::createType), and any data handling, data key, or data replacement properties.
A table may optionally be designated to use a replicated distribution scheme, or be assigned: foreign keys to other tables, a partitioning scheme, and/or a tier strategy.
Definition at line 59 of file create_table.h.
Constructor & Destructor Documentation
◆ CreateTableRequest() [1/2]
| inline |
Constructs a CreateTableRequest object with default parameters.
Definition at line 64 of file create_table.h.
◆ CreateTableRequest() [2/2]
| inline |
Constructs a CreateTableRequest object with the specified parameters.
| [in] | tableName_ | Name of the table to be created, in [schema_name.]table_name format, using standard name resolution rules and meeting table naming criteria. Error for requests with existing table of the same name and type ID may be suppressed by using the no_error_if_exists option. |
| [in] | typeId_ | The type for the table, specified as either an existing table’s numerical type ID (as returned by GPUdb::createType) or a type definition (as described above). |
| [in] | options_ | Optional parameters.
|
Definition at line 423 of file create_table.h.
Member Data Documentation
◆ options
| std::map<std::string, std::string> gpudb::CreateTableRequest::options |
Optional parameters.
- create_table_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. Supported values:The default value is create_table_false.
- create_table_create_temp_table: If true, a unique temporary table name will be generated in the sys_temp schema and used in place of tableName. 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. Supported values:The default value is create_table_false.
- create_table_collection_name: [DEPRECATED–please specify the containing schema as part of tableName and use GPUdb::createSchema 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.
- create_table_is_collection: [DEPRECATED–please use GPUdb::createSchema to create a schema instead] Indicates whether to create a schema instead of a table. Supported values:The default value is create_table_false.
- create_table_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 typeId, 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. Supported values:The default value is create_table_false.
- create_table_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]’.
- create_table_foreign_shard_key: Foreign shard key of the format ‘source_column references shard_by_column from target_table(primary_key_column)’.
- create_table_partition_type: Partitioning scheme to use. Supported values:
- create_table_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.
- create_table_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.
- create_table_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. Supported values:The default value is create_table_false.
- create_table_ttl: Sets the TTL of the table specified in tableName.
- create_table_chunk_size: Indicates the number of records per chunk to be used for this table.
- create_table_chunk_column_max_memory: Indicates the target maximum data size for each column in a chunk to be used for this table.
- create_table_chunk_max_memory: Indicates the target maximum data size for all columns in a chunk to be used for this table.
- create_table_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. Supported values:The default value is create_table_false.
- create_table_strategy_definition: The tier strategy for the table and its columns.
- create_table_compression_codec: The default compression codec for this table’s columns.
- create_table_load_vectors_policy: Set startup data loading scheme for the table. Supported values:
- create_table_always: Load as much vector data as possible into memory before accepting requests.
- create_table_lazy: Load the necessary vector data at start, and load the remainder lazily.
- create_table_on_demand: Load vector data as requests use it.
- create_table_system: Load vector data using the system-configured default.
- create_table_build_pk_index_policy: Set startup primary-key index generation scheme for the table. Supported values:
- create_table_always: Generate as much primary key index data as possible before accepting requests.
- create_table_lazy: Generate the necessary primary key index data at start, and load the remainder lazily.
- create_table_on_demand: Generate primary key index data as requests use it.
- create_table_system: Generate primary key index data using the system-configured default.
The default value is an empty map.
Definition at line 685 of file create_table.h.
◆ tableName
| std::string gpudb::CreateTableRequest::tableName |
Name of the table to be created, in [ schema_name. ]table_name format, using standard name resolution rules and meeting table naming criteria.
Error for requests with existing table of the same name and type ID may be suppressed by using the no_error_if_exists option.
Definition at line 441 of file create_table.h.
◆ typeId
| std::string gpudb::CreateTableRequest::typeId |
The type for the table, specified as either an existing table’s numerical type ID (as returned by GPUdb::createType) or a type definition (as described above).
Definition at line 449 of file create_table.h.
The documentation for this struct was generated from the following file:
- gpudb/protocol/create_table.h