> ## 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.

# gpudb::CreateTableRequest

> gpudb::CreateTableRequest — Kinetica C++ API

<div className="kinetica-doxygen">
  <div className="contents">
    <p>A set of parameters for <a className="el" href="/content/api/cpp/classgpudb_1_1GPUdb#a827d2d54888b00d0dcc69599325de9cf">GPUdb::createTable</a>. <a href="#details">More...</a></p>
    <p><code>#include \<<a className="el" href="/content/api/cpp/create__table_8h_source">gpudb/protocol/create\_table.h</a>></code></p>

    <table className="memberdecls">
      <tr className="heading">
        <td colSpan="2">
          <h2 className="groupheader"> Public Member Functions</h2>
        </td>
      </tr>

      <tr className="memitem:a27d3f6cf013707a0c5963b72ed32e22d" id="r_a27d3f6cf013707a0c5963b72ed32e22d">
        <td className="memItemLeft" align="right" valign="top"> </td>
        <td className="memItemRight" valign="bottom"><a className="el" href="#a27d3f6cf013707a0c5963b72ed32e22d">CreateTableRequest</a> ()</td>
      </tr>

      <tr className="memdesc:a27d3f6cf013707a0c5963b72ed32e22d">
        <td className="mdescLeft"> </td>
        <td className="mdescRight">Constructs a <a className="el" href="/content/api/cpp/structgpudb_1_1CreateTableRequest" title="A set of parameters for GPUdb::createTable.">CreateTableRequest</a> object with default parameters. <br /></td>
      </tr>

      <tr className="separator:a27d3f6cf013707a0c5963b72ed32e22d">
        <td className="memSeparator" colSpan="2"> </td>
      </tr>

      <tr className="memitem:a1b893fc1ebf7c2f36d1741b90b2885a7" id="r_a1b893fc1ebf7c2f36d1741b90b2885a7">
        <td className="memItemLeft" align="right" valign="top"> </td>
        <td className="memItemRight" valign="bottom"><a className="el" href="#a1b893fc1ebf7c2f36d1741b90b2885a7">CreateTableRequest</a> (const std::string \&tableName\_, const std::string \&typeId\_, const std::map\< std::string, std::string > \&options\_)</td>
      </tr>

      <tr className="memdesc:a1b893fc1ebf7c2f36d1741b90b2885a7">
        <td className="mdescLeft"> </td>
        <td className="mdescRight">Constructs a <a className="el" href="/content/api/cpp/structgpudb_1_1CreateTableRequest" title="A set of parameters for GPUdb::createTable.">CreateTableRequest</a> object with the specified parameters. <br /></td>
      </tr>

      <tr className="separator:a1b893fc1ebf7c2f36d1741b90b2885a7">
        <td className="memSeparator" colSpan="2"> </td>
      </tr>
    </table>

    <table className="memberdecls">
      <tr className="heading">
        <td colSpan="2">
          <h2 className="groupheader"> Public Attributes</h2>
        </td>
      </tr>

      <tr className="memitem:ab5d57ce6b2ab9f8a021dc0dbba7961a8" id="r_ab5d57ce6b2ab9f8a021dc0dbba7961a8">
        <td className="memItemLeft" align="right" valign="top">std::string </td>
        <td className="memItemRight" valign="bottom"><a className="el" href="#ab5d57ce6b2ab9f8a021dc0dbba7961a8">tableName</a></td>
      </tr>

      <tr className="memdesc:ab5d57ce6b2ab9f8a021dc0dbba7961a8">
        <td className="mdescLeft"> </td>
        <td className="mdescRight">Name of the table to be created, in \[ schema\_name. ]table\_name format, using standard <a href="/content/concepts/tables/#table-name-resolution" target="_top">name resolution rules</a> and meeting <a href="/content/concepts/tables/#table-naming-criteria" target="_top">table naming criteria</a>. <br /></td>
      </tr>

      <tr className="separator:ab5d57ce6b2ab9f8a021dc0dbba7961a8">
        <td className="memSeparator" colSpan="2"> </td>
      </tr>

      <tr className="memitem:a0352e9c8a05a6b02fd1676ecfb5f10f3" id="r_a0352e9c8a05a6b02fd1676ecfb5f10f3">
        <td className="memItemLeft" align="right" valign="top">std::string </td>
        <td className="memItemRight" valign="bottom"><a className="el" href="#a0352e9c8a05a6b02fd1676ecfb5f10f3">typeId</a></td>
      </tr>

      <tr className="memdesc:a0352e9c8a05a6b02fd1676ecfb5f10f3">
        <td className="mdescLeft"> </td>
        <td className="mdescRight">The type for the table, specified as either an existing table's numerical type ID (as returned by <a className="el" href="/content/api/cpp/classgpudb_1_1GPUdb#abaf7eca0d3c131b8fede4850d51f1a1a">GPUdb::createType</a>) or a type definition (as described above). <br /></td>
      </tr>

      <tr className="separator:a0352e9c8a05a6b02fd1676ecfb5f10f3">
        <td className="memSeparator" colSpan="2"> </td>
      </tr>

      <tr className="memitem:aa84465147f38d0ae8feac77e78af16e8" id="r_aa84465147f38d0ae8feac77e78af16e8">
        <td className="memItemLeft" align="right" valign="top">std::map\< std::string, std::string > </td>
        <td className="memItemRight" valign="bottom"><a className="el" href="#aa84465147f38d0ae8feac77e78af16e8">options</a></td>
      </tr>

      <tr className="memdesc:aa84465147f38d0ae8feac77e78af16e8">
        <td className="mdescLeft"> </td>
        <td className="mdescRight">Optional parameters. <br /></td>
      </tr>

      <tr className="separator:aa84465147f38d0ae8feac77e78af16e8">
        <td className="memSeparator" colSpan="2"> </td>
      </tr>
    </table>

    <h2 className="groupheader">Detailed Description</h2>

    <div className="textblock">
      <p>A set of parameters for <a className="el" href="/content/api/cpp/classgpudb_1_1GPUdb#a827d2d54888b00d0dcc69599325de9cf">GPUdb::createTable</a>. </p>
      <p>Creates a new table with the given type (definition of columns). The type is specified in <a className="el" href="#a0352e9c8a05a6b02fd1676ecfb5f10f3">typeId</a> as either a numerical type ID (as returned by <a className="el" href="/content/api/cpp/classgpudb_1_1GPUdb#abaf7eca0d3c131b8fede4850d51f1a1a">GPUdb::createType</a>) or as a list of columns, each specified as a list of the column name, data type, and any column attributes.</p>
      <p>Example of a type definition with some parameters: </p>

      <div className="fragment">
        <div className="line">\[</div>
        <div className="line"> \[<span className="stringliteral">"id"</span>, <span className="stringliteral">"int8"</span>, <span className="stringliteral">"primary\_key"</span>],</div>
        <div className="line"> \[<span className="stringliteral">"dept\_id"</span>, <span className="stringliteral">"int8"</span>, <span className="stringliteral">"primary\_key"</span>, <span className="stringliteral">"shard\_key"</span>],</div>
        <div className="line"> \[<span className="stringliteral">"manager\_id"</span>, <span className="stringliteral">"int8"</span>, <span className="stringliteral">"nullable"</span>],</div>
        <div className="line"> \[<span className="stringliteral">"first\_name"</span>, <span className="stringliteral">"char32"</span>],</div>
        <div className="line"> \[<span className="stringliteral">"last\_name"</span>, <span className="stringliteral">"char64"</span>],</div>
        <div className="line"> \[<span className="stringliteral">"salary"</span>, <span className="stringliteral">"decimal"</span>],</div>
        <div className="line"> \[<span className="stringliteral">"hire\_date"</span>, <span className="stringliteral">"date"</span>]</div>
        <div className="line">]</div>
      </div>

      <p> Each column definition consists of the column name (which should meet the standard <a href="/content/concepts/tables/#table-naming-criteria" target="_top">column naming criteria</a>), the column's <a href="/content/concepts/types/#types-chart" target="_top">specific type</a> (int, long, float, double, string, bytes, or any of the properties map values from <a className="el" href="/content/api/cpp/classgpudb_1_1GPUdb#abaf7eca0d3c131b8fede4850d51f1a1a">GPUdb::createType</a>), and any <a href="/content/concepts/types/#types-data-handling" target="_top">data handling</a>, <a href="/content/concepts/types/#types-data-keys" target="_top">data key</a>, or <a href="/content/concepts/types/#types-data-replace" target="_top">data replacement</a> properties.</p>
      <p>A table may optionally be designated to use a <a href="/content/concepts/tables/#replication" target="_top">replicated</a> distribution scheme, or be assigned: <a href="/content/concepts/tables/#foreign-keys" target="_top">foreign keys</a> to other tables, a <a href="/content/concepts/tables/#partitioning" target="_top">partitioning</a> scheme, and/or a <a href="/content/rm/concepts/#tier-strategies" target="_top">tier strategy</a>. </p>
      <p className="definition">Definition at line <a className="el" href="/content/api/cpp/create__table_8h_source#l00059">59</a> of file <a className="el" href="/content/api/cpp/create__table_8h_source">create\_table.h</a>.</p>
    </div>

    <h2 className="groupheader">Constructor & Destructor Documentation</h2>
    <h2 className="memtitle"><span className="permalink"><a href="#a27d3f6cf013707a0c5963b72ed32e22d">◆ </a></span>CreateTableRequest() <span className="overload">\[1/2]</span></h2>

    <div className="memitem">
      <div className="memproto">
        <table className="mlabels">
          <tr>
            <td className="mlabels-left">
              <table className="memname">
                <tr>
                  <td className="memname">gpudb::CreateTableRequest::CreateTableRequest </td>
                  <td>(</td>

                  <td className="paramname">
                    <span className="paramname">
                      <span className="em" />
                    </span>
                  </td>

                  <td>)</td>

                  <td />
                </tr>
              </table>
            </td>

            <td className="mlabels-right"> <span className="mlabels"><span className="mlabel inline">inline</span></span> </td>
          </tr>
        </table>
      </div>

      <div className="memdoc">
        <p>Constructs a <a className="el" href="/content/api/cpp/structgpudb_1_1CreateTableRequest" title="A set of parameters for GPUdb::createTable.">CreateTableRequest</a> object with default parameters. </p>
        <p className="definition">Definition at line <a className="el" href="/content/api/cpp/create__table_8h_source#l00064">64</a> of file <a className="el" href="/content/api/cpp/create__table_8h_source">create\_table.h</a>.</p>
      </div>
    </div>

    <h2 className="memtitle"><span className="permalink"><a href="#a1b893fc1ebf7c2f36d1741b90b2885a7">◆ </a></span>CreateTableRequest() <span className="overload">\[2/2]</span></h2>

    <div className="memitem">
      <div className="memproto">
        <table className="mlabels">
          <tr>
            <td className="mlabels-left">
              <table className="memname">
                <tr>
                  <td className="memname">gpudb::CreateTableRequest::CreateTableRequest </td>
                  <td>(</td>
                  <td className="paramtype">const std::string &</td>
                  <td className="paramname"><span className="paramname"><span className="em">tableName\_</span></span>, </td>
                </tr>

                <tr>
                  <td className="paramkey" />

                  <td />

                  <td className="paramtype">const std::string &</td>
                  <td className="paramname"><span className="paramname"><span className="em">typeId\_</span></span>, </td>
                </tr>

                <tr>
                  <td className="paramkey" />

                  <td />

                  <td className="paramtype">const std::map\< std::string, std::string > &</td>
                  <td className="paramname"><span className="paramname"><span className="em">options\_</span></span> )</td>
                </tr>
              </table>
            </td>

            <td className="mlabels-right"> <span className="mlabels"><span className="mlabel inline">inline</span></span> </td>
          </tr>
        </table>
      </div>

      <div className="memdoc">
        <p>Constructs a <a className="el" href="/content/api/cpp/structgpudb_1_1CreateTableRequest" title="A set of parameters for GPUdb::createTable.">CreateTableRequest</a> object with the specified parameters. </p>

        <div className="dl params">
          <div className="dt">Parameters</div>

          <div className="dd">
            <table className="params">
              <tr>
                <td className="paramdir">\[in]</td>
                <td className="paramname">tableName\_</td>
                <td>Name of the table to be created, in \[schema\_name.]table\_name format, using standard <a href="/content/concepts/tables/#table-name-resolution" target="_top">name resolution rules</a> and meeting <a href="/content/concepts/tables/#table-naming-criteria" target="_top">table naming criteria</a>. Error for requests with existing table of the same name and type ID may be suppressed by using the <a className="el" href="/content/api/cpp/namespacegpudb#a445fe2911b822623e6b26c0f61582cb0">no\_error\_if\_exists</a> option. </td>
              </tr>

              <tr>
                <td className="paramdir">\[in]</td>
                <td className="paramname">typeId\_</td>
                <td>The type for the table, specified as either an existing table's numerical type ID (as returned by <a className="el" href="/content/api/cpp/classgpudb_1_1GPUdb#abaf7eca0d3c131b8fede4850d51f1a1a">GPUdb::createType</a>) or a type definition (as described above). </td>
              </tr>

              <tr>
                <td className="paramdir">\[in]</td>
                <td className="paramname">options\_</td>

                <td>
                  Optional parameters.

                  <ul>
                    <li>
                      <a className="el" href="/content/api/cpp/namespacegpudb#a445fe2911b822623e6b26c0f61582cb0">create\_table\_no\_error\_if\_exists</a>: If <a className="el" href="/content/api/cpp/namespacegpudb#a68723d817c882f8faad2f766b8c7e257">true</a>, 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:

                      <ul>
                        <li> <a className="el" href="/content/api/cpp/namespacegpudb#a68723d817c882f8faad2f766b8c7e257">create\_table\_true</a> </li>
                        <li> <a className="el" href="/content/api/cpp/namespacegpudb#ab17cfbe49f1596f55781f32a5872bfc1">create\_table\_false</a> </li>
                      </ul>

                      The default value is <a className="el" href="/content/api/cpp/namespacegpudb#ab17cfbe49f1596f55781f32a5872bfc1">create\_table\_false</a>.
                    </li>

                    <li>
                      <a className="el" href="/content/api/cpp/namespacegpudb#a75e7a9939c2083b76dba6b1528fbf632">create\_table\_create\_temp\_table</a>: If <a className="el" href="/content/api/cpp/namespacegpudb#a68723d817c882f8faad2f766b8c7e257">true</a>, a unique temporary table name will be generated in the sys\_temp schema and used in place of <span className="em arg">tableName\_</span>. If <a className="el" href="/content/api/cpp/namespacegpudb#a2a26ae1a59d1e4bf8198e9b14ced4206">is\_result\_table</a> is <a className="el" href="/content/api/cpp/namespacegpudb#a68723d817c882f8faad2f766b8c7e257">true</a>, then this is always allowed even if the caller does not have permission to create tables. The generated name is returned in <a className="el" href="/content/api/cpp/namespacegpudb#a796ca8a225bfd583d58ff4becbd2783b">qualified\_table\_name</a>. Supported values:

                      <ul>
                        <li> <a className="el" href="/content/api/cpp/namespacegpudb#a68723d817c882f8faad2f766b8c7e257">create\_table\_true</a> </li>
                        <li> <a className="el" href="/content/api/cpp/namespacegpudb#ab17cfbe49f1596f55781f32a5872bfc1">create\_table\_false</a> </li>
                      </ul>

                      The default value is <a className="el" href="/content/api/cpp/namespacegpudb#ab17cfbe49f1596f55781f32a5872bfc1">create\_table\_false</a>.
                    </li>

                    <li> <a className="el" href="/content/api/cpp/namespacegpudb#a320af8dc09625175c60c4323dce04a21">create\_table\_collection\_name</a>: \[DEPRECATED–please specify the containing schema as part of <span className="em arg">tableName\_</span> and use <a className="el" href="/content/api/cpp/classgpudb_1_1GPUdb#a4aa5990ebebfab30b5961654f546cfd0">GPUdb::createSchema</a> 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. </li>

                    <li>
                      <a className="el" href="/content/api/cpp/namespacegpudb#ad9b9d5b641d939c630d101617a4a797a">create\_table\_is\_collection</a>: \[DEPRECATED–please use <a className="el" href="/content/api/cpp/classgpudb_1_1GPUdb#a4aa5990ebebfab30b5961654f546cfd0">GPUdb::createSchema</a> to create a schema instead] Indicates whether to create a schema instead of a table. Supported values:

                      <ul>
                        <li> <a className="el" href="/content/api/cpp/namespacegpudb#a68723d817c882f8faad2f766b8c7e257">create\_table\_true</a> </li>
                        <li> <a className="el" href="/content/api/cpp/namespacegpudb#ab17cfbe49f1596f55781f32a5872bfc1">create\_table\_false</a> </li>
                      </ul>

                      The default value is <a className="el" href="/content/api/cpp/namespacegpudb#ab17cfbe49f1596f55781f32a5872bfc1">create\_table\_false</a>.
                    </li>

                    <li>
                      <a className="el" href="/content/api/cpp/namespacegpudb#a7104ca5c6ded54736e509ced7321de4c">create\_table\_is\_replicated</a>: Affects the <a href="/content/concepts/tables/#distribution" target="_top">distribution scheme</a> for the table's data. If <a className="el" href="/content/api/cpp/namespacegpudb#a68723d817c882f8faad2f766b8c7e257">true</a> and the given type has no explicit <a href="/content/concepts/tables/#shard-key" target="_top">shard key</a> defined, the table will be <a href="/content/concepts/tables/#replication" target="_top">replicated</a>. If <a className="el" href="/content/api/cpp/namespacegpudb#ab17cfbe49f1596f55781f32a5872bfc1">false</a>, the table will be <a href="/content/concepts/tables/#sharding" target="_top">sharded</a> according to the shard key specified in the given <span className="em arg">typeId\_</span>, or <a href="/content/concepts/tables/#random-sharding" target="_top">randomly sharded</a>, if no shard key is specified. Note that a type containing a shard key cannot be used to create a replicated table. Supported values:

                      <ul>
                        <li> <a className="el" href="/content/api/cpp/namespacegpudb#a68723d817c882f8faad2f766b8c7e257">create\_table\_true</a> </li>
                        <li> <a className="el" href="/content/api/cpp/namespacegpudb#ab17cfbe49f1596f55781f32a5872bfc1">create\_table\_false</a> </li>
                      </ul>

                      The default value is <a className="el" href="/content/api/cpp/namespacegpudb#ab17cfbe49f1596f55781f32a5872bfc1">create\_table\_false</a>.
                    </li>

                    <li> <a className="el" href="/content/api/cpp/namespacegpudb#a3f4810f9b5ac72ce020838ad7ae1fa7b">create\_table\_foreign\_keys</a>: Semicolon-separated list of <a href="/content/concepts/tables/#foreign-keys" target="_top">foreign keys</a>, of the format '(source\_column\_name \[, ...]) references target\_table\_name(primary\_key\_column\_name \[, ...]) \[as foreign\_key\_name]'. </li>
                    <li> <a className="el" href="/content/api/cpp/namespacegpudb#ad4682bfc3b6e98ce320f1744ed4ebfc2">create\_table\_foreign\_shard\_key</a>: Foreign shard key of the format 'source\_column references shard\_by\_column from target\_table(primary\_key\_column)'. </li>

                    <li>
                      <a className="el" href="/content/api/cpp/namespacegpudb#a5f288dbab3fe8010bc8b26745edbfaf5">create\_table\_partition\_type</a>: <a href="/content/concepts/tables/#partitioning" target="_top">Partitioning</a> scheme to use. Supported values:

                      <ul>
                        <li> <a className="el" href="/content/api/cpp/namespacegpudb#aac595de77c6941518b867c5eb4bc8e09">create\_table\_RANGE</a>: Use <a href="/content/concepts/tables/#partitioning-by-range" target="_top">range partitioning</a>. </li>
                        <li> <a className="el" href="/content/api/cpp/namespacegpudb#a24db8d104d04c4d5da62b8daccfd3d66">create\_table\_INTERVAL</a>: Use <a href="/content/concepts/tables/#partitioning-by-interval" target="_top">interval partitioning</a>. </li>
                        <li> <a className="el" href="/content/api/cpp/namespacegpudb#aa220da05672544f5968b40143c155b41">create\_table\_LIST</a>: Use <a href="/content/concepts/tables/#partitioning-by-list" target="_top">list partitioning</a>. </li>
                        <li> <a className="el" href="/content/api/cpp/namespacegpudb#a31d7cab03373e8c7f89cdcee2d333775">create\_table\_HASH</a>: Use <a href="/content/concepts/tables/#partitioning-by-hash" target="_top">hash partitioning</a>. </li>
                        <li> <a className="el" href="/content/api/cpp/namespacegpudb#aed61431bd9e0877bf37d4939d86128fb">create\_table\_SERIES</a>: Use <a href="/content/concepts/tables/#partitioning-by-series" target="_top">series partitioning</a>. </li>
                      </ul>
                    </li>

                    <li> <a className="el" href="/content/api/cpp/namespacegpudb#acf1547f910bed470a4ea76dde79ffd97">create\_table\_partition\_keys</a>: Comma-separated list of partition keys, which are the columns or column expressions by which records will be assigned to partitions defined by <a className="el" href="/content/api/cpp/namespacegpudb#a62f22ffeb7adf9117dacf811916cb850">partition\_definitions</a>. </li>
                    <li> <a className="el" href="/content/api/cpp/namespacegpudb#a62f22ffeb7adf9117dacf811916cb850">create\_table\_partition\_definitions</a>: Comma-separated list of partition definitions, whose format depends on the choice of <a className="el" href="/content/api/cpp/namespacegpudb#a5f288dbab3fe8010bc8b26745edbfaf5">partition\_type</a>. See <a href="/content/concepts/tables/#partitioning-by-range" target="_top">range partitioning</a>, <a href="/content/concepts/tables/#partitioning-by-interval" target="_top">interval partitioning</a>, <a href="/content/concepts/tables/#partitioning-by-list" target="_top">list partitioning</a>, <a href="/content/concepts/tables/#partitioning-by-hash" target="_top">hash partitioning</a>, or <a href="/content/concepts/tables/#partitioning-by-series" target="_top">series partitioning</a> for example formats. </li>

                    <li>
                      <a className="el" href="/content/api/cpp/namespacegpudb#a43cb4aab1169616535d36a3a7180c40c">create\_table\_is\_automatic\_partition</a>: If <a className="el" href="/content/api/cpp/namespacegpudb#a68723d817c882f8faad2f766b8c7e257">true</a>, a new partition will be created for values which don't fall into an existing partition. Currently only supported for <a href="/content/concepts/tables/#partitioning-by-list" target="_top">list partitions</a>. Supported values:

                      <ul>
                        <li> <a className="el" href="/content/api/cpp/namespacegpudb#a68723d817c882f8faad2f766b8c7e257">create\_table\_true</a> </li>
                        <li> <a className="el" href="/content/api/cpp/namespacegpudb#ab17cfbe49f1596f55781f32a5872bfc1">create\_table\_false</a> </li>
                      </ul>

                      The default value is <a className="el" href="/content/api/cpp/namespacegpudb#ab17cfbe49f1596f55781f32a5872bfc1">create\_table\_false</a>.
                    </li>

                    <li> <a className="el" href="/content/api/cpp/namespacegpudb#af49995b11df0dfc22a4b090943ec5079">create\_table\_ttl</a>: Sets the <a href="/content/concepts/ttl/" target="_top">TTL</a> of the table specified in <span className="em arg">tableName\_</span>. </li>
                    <li> <a className="el" href="/content/api/cpp/namespacegpudb#ab456675e6c896b874d3337e8cd986fac">create\_table\_chunk\_size</a>: Indicates the number of records per chunk to be used for this table. </li>
                    <li> <a className="el" href="/content/api/cpp/namespacegpudb#acdfeaeb456bc0e07d2d70e78f0cedb87">create\_table\_chunk\_column\_max\_memory</a>: Indicates the target maximum data size for each column in a chunk to be used for this table. </li>
                    <li> <a className="el" href="/content/api/cpp/namespacegpudb#a4f013c37bc4c582d105041a915e3a749">create\_table\_chunk\_max\_memory</a>: Indicates the target maximum data size for all columns in a chunk to be used for this table. </li>

                    <li>
                      <a className="el" href="/content/api/cpp/namespacegpudb#a2a26ae1a59d1e4bf8198e9b14ced4206">create\_table\_is\_result\_table</a>: Indicates whether the table is a <a href="/content/concepts/tables_memory_only/" target="_top">memory-only table</a>. A result table cannot contain columns with text\_search <a href="/content/concepts/types/#data-handling" target="_top">data-handling</a>, and it will not be retained if the server is restarted. Supported values:

                      <ul>
                        <li> <a className="el" href="/content/api/cpp/namespacegpudb#a68723d817c882f8faad2f766b8c7e257">create\_table\_true</a> </li>
                        <li> <a className="el" href="/content/api/cpp/namespacegpudb#ab17cfbe49f1596f55781f32a5872bfc1">create\_table\_false</a> </li>
                      </ul>

                      The default value is <a className="el" href="/content/api/cpp/namespacegpudb#ab17cfbe49f1596f55781f32a5872bfc1">create\_table\_false</a>.
                    </li>

                    <li> <a className="el" href="/content/api/cpp/namespacegpudb#af71f5faa5ea865bbc6779651c3cf10b7">create\_table\_strategy\_definition</a>: The <a href="/content/rm/concepts/#tier-strategies" target="_top">tier strategy</a> for the table and its columns. </li>
                    <li> <a className="el" href="/content/api/cpp/namespacegpudb#ac5fbcd23a4aea42bc696d4c2a1f7cd2f">create\_table\_compression\_codec</a>: The default <a href="/content/concepts/column_compression/" target="_top">compression codec</a> for this table's columns. </li>

                    <li>
                      <a className="el" href="/content/api/cpp/namespacegpudb#a4cda2a25a7f3eeb83b863d37cd1f25ad">create\_table\_load\_vectors\_policy</a>: Set startup data loading scheme for the table. Supported values:

                      <ul>
                        <li> <a className="el" href="/content/api/cpp/namespacegpudb#ad317bb7b1a5ed5b3c3a0b1e8107ff267">create\_table\_always</a>: Load as much vector data as possible into memory before accepting requests. </li>
                        <li> <a className="el" href="/content/api/cpp/namespacegpudb#a4401fcef8c5e17e1a2b6b89f211873f5">create\_table\_lazy</a>: Load the necessary vector data at start, and load the remainder lazily. </li>
                        <li> <a className="el" href="/content/api/cpp/namespacegpudb#a216b642aff207bee5303342b3b702e00">create\_table\_on\_demand</a>: Load vector data as requests use it. </li>
                        <li> <a className="el" href="/content/api/cpp/namespacegpudb#a96651b624b201e35d2463e0ecde8a776">create\_table\_system</a>: Load vector data using the system-configured default. </li>
                      </ul>

                      The default value is <a className="el" href="/content/api/cpp/namespacegpudb#a96651b624b201e35d2463e0ecde8a776">create\_table\_system</a>.
                    </li>

                    <li>
                      <a className="el" href="/content/api/cpp/namespacegpudb#ad7001f1b36ac610de60739dcf78cf729">create\_table\_build\_pk\_index\_policy</a>: Set startup primary-key index generation scheme for the table. Supported values:

                      <ul>
                        <li> <a className="el" href="/content/api/cpp/namespacegpudb#ad317bb7b1a5ed5b3c3a0b1e8107ff267">create\_table\_always</a>: Generate as much primary key index data as possible before accepting requests. </li>
                        <li> <a className="el" href="/content/api/cpp/namespacegpudb#a4401fcef8c5e17e1a2b6b89f211873f5">create\_table\_lazy</a>: Generate the necessary primary key index data at start, and load the remainder lazily. </li>
                        <li> <a className="el" href="/content/api/cpp/namespacegpudb#a216b642aff207bee5303342b3b702e00">create\_table\_on\_demand</a>: Generate primary key index data as requests use it. </li>
                        <li> <a className="el" href="/content/api/cpp/namespacegpudb#a96651b624b201e35d2463e0ecde8a776">create\_table\_system</a>: Generate primary key index data using the system-configured default. </li>
                      </ul>

                      The default value is <a className="el" href="/content/api/cpp/namespacegpudb#a96651b624b201e35d2463e0ecde8a776">create\_table\_system</a>.
                    </li>
                  </ul>

                  The default value is an empty map.
                </td>
              </tr>
            </table>
          </div>
        </div>

        <p className="definition">Definition at line <a className="el" href="/content/api/cpp/create__table_8h_source#l00423">423</a> of file <a className="el" href="/content/api/cpp/create__table_8h_source">create\_table.h</a>.</p>
      </div>
    </div>

    <h2 className="groupheader">Member Data Documentation</h2>
    <h2 className="memtitle"><span className="permalink"><a href="#aa84465147f38d0ae8feac77e78af16e8">◆ </a></span>options</h2>

    <div className="memitem">
      <div className="memproto">
        <table className="memname">
          <tr>
            <td className="memname">std::map\<std::string, std::string> gpudb::CreateTableRequest::options</td>
          </tr>
        </table>
      </div>

      <div className="memdoc">
        <p>Optional parameters. </p>

        <ul>
          <li>
            <a className="el" href="/content/api/cpp/namespacegpudb#a445fe2911b822623e6b26c0f61582cb0">create\_table\_no\_error\_if\_exists</a>: If <a className="el" href="/content/api/cpp/namespacegpudb#a68723d817c882f8faad2f766b8c7e257">true</a>, 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:

            <ul>
              <li> <a className="el" href="/content/api/cpp/namespacegpudb#a68723d817c882f8faad2f766b8c7e257">create\_table\_true</a> </li>
              <li> <a className="el" href="/content/api/cpp/namespacegpudb#ab17cfbe49f1596f55781f32a5872bfc1">create\_table\_false</a> </li>
            </ul>

            The default value is <a className="el" href="/content/api/cpp/namespacegpudb#ab17cfbe49f1596f55781f32a5872bfc1">create\_table\_false</a>.
          </li>

          <li>
            <a className="el" href="/content/api/cpp/namespacegpudb#a75e7a9939c2083b76dba6b1528fbf632">create\_table\_create\_temp\_table</a>: If <a className="el" href="/content/api/cpp/namespacegpudb#a68723d817c882f8faad2f766b8c7e257">true</a>, a unique temporary table name will be generated in the sys\_temp schema and used in place of <a className="el" href="#ab5d57ce6b2ab9f8a021dc0dbba7961a8">tableName</a>. If <a className="el" href="/content/api/cpp/namespacegpudb#a2a26ae1a59d1e4bf8198e9b14ced4206">is\_result\_table</a> is <a className="el" href="/content/api/cpp/namespacegpudb#a68723d817c882f8faad2f766b8c7e257">true</a>, then this is always allowed even if the caller does not have permission to create tables. The generated name is returned in <a className="el" href="/content/api/cpp/namespacegpudb#a796ca8a225bfd583d58ff4becbd2783b">qualified\_table\_name</a>. Supported values:

            <ul>
              <li> <a className="el" href="/content/api/cpp/namespacegpudb#a68723d817c882f8faad2f766b8c7e257">create\_table\_true</a> </li>
              <li> <a className="el" href="/content/api/cpp/namespacegpudb#ab17cfbe49f1596f55781f32a5872bfc1">create\_table\_false</a> </li>
            </ul>

            The default value is <a className="el" href="/content/api/cpp/namespacegpudb#ab17cfbe49f1596f55781f32a5872bfc1">create\_table\_false</a>.
          </li>

          <li> <a className="el" href="/content/api/cpp/namespacegpudb#a320af8dc09625175c60c4323dce04a21">create\_table\_collection\_name</a>: \[DEPRECATED–please specify the containing schema as part of <a className="el" href="#ab5d57ce6b2ab9f8a021dc0dbba7961a8">tableName</a> and use <a className="el" href="/content/api/cpp/classgpudb_1_1GPUdb#a4aa5990ebebfab30b5961654f546cfd0">GPUdb::createSchema</a> 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. </li>

          <li>
            <a className="el" href="/content/api/cpp/namespacegpudb#ad9b9d5b641d939c630d101617a4a797a">create\_table\_is\_collection</a>: \[DEPRECATED–please use <a className="el" href="/content/api/cpp/classgpudb_1_1GPUdb#a4aa5990ebebfab30b5961654f546cfd0">GPUdb::createSchema</a> to create a schema instead] Indicates whether to create a schema instead of a table. Supported values:

            <ul>
              <li> <a className="el" href="/content/api/cpp/namespacegpudb#a68723d817c882f8faad2f766b8c7e257">create\_table\_true</a> </li>
              <li> <a className="el" href="/content/api/cpp/namespacegpudb#ab17cfbe49f1596f55781f32a5872bfc1">create\_table\_false</a> </li>
            </ul>

            The default value is <a className="el" href="/content/api/cpp/namespacegpudb#ab17cfbe49f1596f55781f32a5872bfc1">create\_table\_false</a>.
          </li>

          <li>
            <a className="el" href="/content/api/cpp/namespacegpudb#a7104ca5c6ded54736e509ced7321de4c">create\_table\_is\_replicated</a>: Affects the <a href="/content/concepts/tables/#distribution" target="_top">distribution scheme</a> for the table's data. If <a className="el" href="/content/api/cpp/namespacegpudb#a68723d817c882f8faad2f766b8c7e257">true</a> and the given type has no explicit <a href="/content/concepts/tables/#shard-key" target="_top">shard key</a> defined, the table will be <a href="/content/concepts/tables/#replication" target="_top">replicated</a>. If <a className="el" href="/content/api/cpp/namespacegpudb#ab17cfbe49f1596f55781f32a5872bfc1">false</a>, the table will be <a href="/content/concepts/tables/#sharding" target="_top">sharded</a> according to the shard key specified in the given <a className="el" href="#a0352e9c8a05a6b02fd1676ecfb5f10f3">typeId</a>, or <a href="/content/concepts/tables/#random-sharding" target="_top">randomly sharded</a>, if no shard key is specified. Note that a type containing a shard key cannot be used to create a replicated table. Supported values:

            <ul>
              <li> <a className="el" href="/content/api/cpp/namespacegpudb#a68723d817c882f8faad2f766b8c7e257">create\_table\_true</a> </li>
              <li> <a className="el" href="/content/api/cpp/namespacegpudb#ab17cfbe49f1596f55781f32a5872bfc1">create\_table\_false</a> </li>
            </ul>

            The default value is <a className="el" href="/content/api/cpp/namespacegpudb#ab17cfbe49f1596f55781f32a5872bfc1">create\_table\_false</a>.
          </li>

          <li> <a className="el" href="/content/api/cpp/namespacegpudb#a3f4810f9b5ac72ce020838ad7ae1fa7b">create\_table\_foreign\_keys</a>: Semicolon-separated list of <a href="/content/concepts/tables/#foreign-keys" target="_top">foreign keys</a>, of the format '(source\_column\_name \[, ...]) references target\_table\_name(primary\_key\_column\_name \[, ...]) \[as foreign\_key\_name]'. </li>
          <li> <a className="el" href="/content/api/cpp/namespacegpudb#ad4682bfc3b6e98ce320f1744ed4ebfc2">create\_table\_foreign\_shard\_key</a>: Foreign shard key of the format 'source\_column references shard\_by\_column from target\_table(primary\_key\_column)'. </li>

          <li>
            <a className="el" href="/content/api/cpp/namespacegpudb#a5f288dbab3fe8010bc8b26745edbfaf5">create\_table\_partition\_type</a>: <a href="/content/concepts/tables/#partitioning" target="_top">Partitioning</a> scheme to use. Supported values:

            <ul>
              <li> <a className="el" href="/content/api/cpp/namespacegpudb#aac595de77c6941518b867c5eb4bc8e09">create\_table\_RANGE</a>: Use <a href="/content/concepts/tables/#partitioning-by-range" target="_top">range partitioning</a>. </li>
              <li> <a className="el" href="/content/api/cpp/namespacegpudb#a24db8d104d04c4d5da62b8daccfd3d66">create\_table\_INTERVAL</a>: Use <a href="/content/concepts/tables/#partitioning-by-interval" target="_top">interval partitioning</a>. </li>
              <li> <a className="el" href="/content/api/cpp/namespacegpudb#aa220da05672544f5968b40143c155b41">create\_table\_LIST</a>: Use <a href="/content/concepts/tables/#partitioning-by-list" target="_top">list partitioning</a>. </li>
              <li> <a className="el" href="/content/api/cpp/namespacegpudb#a31d7cab03373e8c7f89cdcee2d333775">create\_table\_HASH</a>: Use <a href="/content/concepts/tables/#partitioning-by-hash" target="_top">hash partitioning</a>. </li>
              <li> <a className="el" href="/content/api/cpp/namespacegpudb#aed61431bd9e0877bf37d4939d86128fb">create\_table\_SERIES</a>: Use <a href="/content/concepts/tables/#partitioning-by-series" target="_top">series partitioning</a>. </li>
            </ul>
          </li>

          <li> <a className="el" href="/content/api/cpp/namespacegpudb#acf1547f910bed470a4ea76dde79ffd97">create\_table\_partition\_keys</a>: Comma-separated list of partition keys, which are the columns or column expressions by which records will be assigned to partitions defined by <a className="el" href="/content/api/cpp/namespacegpudb#a62f22ffeb7adf9117dacf811916cb850">partition\_definitions</a>. </li>
          <li> <a className="el" href="/content/api/cpp/namespacegpudb#a62f22ffeb7adf9117dacf811916cb850">create\_table\_partition\_definitions</a>: Comma-separated list of partition definitions, whose format depends on the choice of <a className="el" href="/content/api/cpp/namespacegpudb#a5f288dbab3fe8010bc8b26745edbfaf5">partition\_type</a>. See <a href="/content/concepts/tables/#partitioning-by-range" target="_top">range partitioning</a>, <a href="/content/concepts/tables/#partitioning-by-interval" target="_top">interval partitioning</a>, <a href="/content/concepts/tables/#partitioning-by-list" target="_top">list partitioning</a>, <a href="/content/concepts/tables/#partitioning-by-hash" target="_top">hash partitioning</a>, or <a href="/content/concepts/tables/#partitioning-by-series" target="_top">series partitioning</a> for example formats. </li>

          <li>
            <a className="el" href="/content/api/cpp/namespacegpudb#a43cb4aab1169616535d36a3a7180c40c">create\_table\_is\_automatic\_partition</a>: If <a className="el" href="/content/api/cpp/namespacegpudb#a68723d817c882f8faad2f766b8c7e257">true</a>, a new partition will be created for values which don't fall into an existing partition. Currently only supported for <a href="/content/concepts/tables/#partitioning-by-list" target="_top">list partitions</a>. Supported values:

            <ul>
              <li> <a className="el" href="/content/api/cpp/namespacegpudb#a68723d817c882f8faad2f766b8c7e257">create\_table\_true</a> </li>
              <li> <a className="el" href="/content/api/cpp/namespacegpudb#ab17cfbe49f1596f55781f32a5872bfc1">create\_table\_false</a> </li>
            </ul>

            The default value is <a className="el" href="/content/api/cpp/namespacegpudb#ab17cfbe49f1596f55781f32a5872bfc1">create\_table\_false</a>.
          </li>

          <li> <a className="el" href="/content/api/cpp/namespacegpudb#af49995b11df0dfc22a4b090943ec5079">create\_table\_ttl</a>: Sets the <a href="/content/concepts/ttl/" target="_top">TTL</a> of the table specified in <a className="el" href="#ab5d57ce6b2ab9f8a021dc0dbba7961a8">tableName</a>. </li>
          <li> <a className="el" href="/content/api/cpp/namespacegpudb#ab456675e6c896b874d3337e8cd986fac">create\_table\_chunk\_size</a>: Indicates the number of records per chunk to be used for this table. </li>
          <li> <a className="el" href="/content/api/cpp/namespacegpudb#acdfeaeb456bc0e07d2d70e78f0cedb87">create\_table\_chunk\_column\_max\_memory</a>: Indicates the target maximum data size for each column in a chunk to be used for this table. </li>
          <li> <a className="el" href="/content/api/cpp/namespacegpudb#a4f013c37bc4c582d105041a915e3a749">create\_table\_chunk\_max\_memory</a>: Indicates the target maximum data size for all columns in a chunk to be used for this table. </li>

          <li>
            <a className="el" href="/content/api/cpp/namespacegpudb#a2a26ae1a59d1e4bf8198e9b14ced4206">create\_table\_is\_result\_table</a>: Indicates whether the table is a <a href="/content/concepts/tables_memory_only/" target="_top">memory-only table</a>. A result table cannot contain columns with text\_search <a href="/content/concepts/types/#data-handling" target="_top">data-handling</a>, and it will not be retained if the server is restarted. Supported values:

            <ul>
              <li> <a className="el" href="/content/api/cpp/namespacegpudb#a68723d817c882f8faad2f766b8c7e257">create\_table\_true</a> </li>
              <li> <a className="el" href="/content/api/cpp/namespacegpudb#ab17cfbe49f1596f55781f32a5872bfc1">create\_table\_false</a> </li>
            </ul>

            The default value is <a className="el" href="/content/api/cpp/namespacegpudb#ab17cfbe49f1596f55781f32a5872bfc1">create\_table\_false</a>.
          </li>

          <li> <a className="el" href="/content/api/cpp/namespacegpudb#af71f5faa5ea865bbc6779651c3cf10b7">create\_table\_strategy\_definition</a>: The <a href="/content/rm/concepts/#tier-strategies" target="_top">tier strategy</a> for the table and its columns. </li>
          <li> <a className="el" href="/content/api/cpp/namespacegpudb#ac5fbcd23a4aea42bc696d4c2a1f7cd2f">create\_table\_compression\_codec</a>: The default <a href="/content/concepts/column_compression/" target="_top">compression codec</a> for this table's columns. </li>

          <li>
            <a className="el" href="/content/api/cpp/namespacegpudb#a4cda2a25a7f3eeb83b863d37cd1f25ad">create\_table\_load\_vectors\_policy</a>: Set startup data loading scheme for the table. Supported values:

            <ul>
              <li> <a className="el" href="/content/api/cpp/namespacegpudb#ad317bb7b1a5ed5b3c3a0b1e8107ff267">create\_table\_always</a>: Load as much vector data as possible into memory before accepting requests. </li>
              <li> <a className="el" href="/content/api/cpp/namespacegpudb#a4401fcef8c5e17e1a2b6b89f211873f5">create\_table\_lazy</a>: Load the necessary vector data at start, and load the remainder lazily. </li>
              <li> <a className="el" href="/content/api/cpp/namespacegpudb#a216b642aff207bee5303342b3b702e00">create\_table\_on\_demand</a>: Load vector data as requests use it. </li>
              <li> <a className="el" href="/content/api/cpp/namespacegpudb#a96651b624b201e35d2463e0ecde8a776">create\_table\_system</a>: Load vector data using the system-configured default. </li>
            </ul>

            The default value is <a className="el" href="/content/api/cpp/namespacegpudb#a96651b624b201e35d2463e0ecde8a776">create\_table\_system</a>.
          </li>

          <li>
            <a className="el" href="/content/api/cpp/namespacegpudb#ad7001f1b36ac610de60739dcf78cf729">create\_table\_build\_pk\_index\_policy</a>: Set startup primary-key index generation scheme for the table. Supported values:

            <ul>
              <li> <a className="el" href="/content/api/cpp/namespacegpudb#ad317bb7b1a5ed5b3c3a0b1e8107ff267">create\_table\_always</a>: Generate as much primary key index data as possible before accepting requests. </li>
              <li> <a className="el" href="/content/api/cpp/namespacegpudb#a4401fcef8c5e17e1a2b6b89f211873f5">create\_table\_lazy</a>: Generate the necessary primary key index data at start, and load the remainder lazily. </li>
              <li> <a className="el" href="/content/api/cpp/namespacegpudb#a216b642aff207bee5303342b3b702e00">create\_table\_on\_demand</a>: Generate primary key index data as requests use it. </li>
              <li> <a className="el" href="/content/api/cpp/namespacegpudb#a96651b624b201e35d2463e0ecde8a776">create\_table\_system</a>: Generate primary key index data using the system-configured default. </li>
            </ul>

            The default value is <a className="el" href="/content/api/cpp/namespacegpudb#a96651b624b201e35d2463e0ecde8a776">create\_table\_system</a>.
          </li>
        </ul>

        <p>The default value is an empty map. </p>
        <p className="definition">Definition at line <a className="el" href="/content/api/cpp/create__table_8h_source#l00685">685</a> of file <a className="el" href="/content/api/cpp/create__table_8h_source">create\_table.h</a>.</p>
      </div>
    </div>

    <h2 className="memtitle"><span className="permalink"><a href="#ab5d57ce6b2ab9f8a021dc0dbba7961a8">◆ </a></span>tableName</h2>

    <div className="memitem">
      <div className="memproto">
        <table className="memname">
          <tr>
            <td className="memname">std::string gpudb::CreateTableRequest::tableName</td>
          </tr>
        </table>
      </div>

      <div className="memdoc">
        <p>Name of the table to be created, in \[ schema\_name. ]table\_name format, using standard <a href="/content/concepts/tables/#table-name-resolution" target="_top">name resolution rules</a> and meeting <a href="/content/concepts/tables/#table-naming-criteria" target="_top">table naming criteria</a>. </p>
        <p>Error for requests with existing table of the same name and type ID may be suppressed by using the <a className="el" href="/content/api/cpp/namespacegpudb#a445fe2911b822623e6b26c0f61582cb0">no\_error\_if\_exists</a> option. </p>
        <p className="definition">Definition at line <a className="el" href="/content/api/cpp/create__table_8h_source#l00441">441</a> of file <a className="el" href="/content/api/cpp/create__table_8h_source">create\_table.h</a>.</p>
      </div>
    </div>

    <h2 className="memtitle"><span className="permalink"><a href="#a0352e9c8a05a6b02fd1676ecfb5f10f3">◆ </a></span>typeId</h2>

    <div className="memitem">
      <div className="memproto">
        <table className="memname">
          <tr>
            <td className="memname">std::string gpudb::CreateTableRequest::typeId</td>
          </tr>
        </table>
      </div>

      <div className="memdoc">
        <p>The type for the table, specified as either an existing table's numerical type ID (as returned by <a className="el" href="/content/api/cpp/classgpudb_1_1GPUdb#abaf7eca0d3c131b8fede4850d51f1a1a">GPUdb::createType</a>) or a type definition (as described above). </p>
        <p className="definition">Definition at line <a className="el" href="/content/api/cpp/create__table_8h_source#l00449">449</a> of file <a className="el" href="/content/api/cpp/create__table_8h_source">create\_table.h</a>.</p>
      </div>
    </div>

    <hr />

    The documentation for this struct was generated from the following file:

    <ul>
      <li>gpudb/protocol/<a className="el" href="/content/api/cpp/create__table_8h_source">create\_table.h</a></li>
    </ul>
  </div>
</div>
