> ## 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::CreateProjectionRequest

> gpudb::CreateProjectionRequest — 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#aab22a8ee1b42ec6fa1acfc3b2f70cf4c">GPUdb::createProjection</a>. <a href="#details">More...</a></p>
    <p><code>#include \<<a className="el" href="/content/api/cpp/create__projection_8h_source">gpudb/protocol/create\_projection.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:a7fda62880500749fd4d37f3eae9337de" id="r_a7fda62880500749fd4d37f3eae9337de">
        <td className="memItemLeft" align="right" valign="top"> </td>
        <td className="memItemRight" valign="bottom"><a className="el" href="#a7fda62880500749fd4d37f3eae9337de">CreateProjectionRequest</a> ()</td>
      </tr>

      <tr className="memdesc:a7fda62880500749fd4d37f3eae9337de">
        <td className="mdescLeft"> </td>
        <td className="mdescRight">Constructs a <a className="el" href="/content/api/cpp/structgpudb_1_1CreateProjectionRequest" title="A set of parameters for GPUdb::createProjection.">CreateProjectionRequest</a> object with default parameters. <br /></td>
      </tr>

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

      <tr className="memitem:ae9b5755a5d139068bc7d0a963312afc6" id="r_ae9b5755a5d139068bc7d0a963312afc6">
        <td className="memItemLeft" align="right" valign="top"> </td>
        <td className="memItemRight" valign="bottom"><a className="el" href="#ae9b5755a5d139068bc7d0a963312afc6">CreateProjectionRequest</a> (const std::string \&tableName\_, const std::string \&projectionName\_, const std::vector\< std::string > \&columnNames\_, const std::map\< std::string, std::string > \&options\_)</td>
      </tr>

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

      <tr className="separator:ae9b5755a5d139068bc7d0a963312afc6">
        <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:a13ca13a16564a1d19aa4572618771f7b" id="r_a13ca13a16564a1d19aa4572618771f7b">
        <td className="memItemLeft" align="right" valign="top">std::string </td>
        <td className="memItemRight" valign="bottom"><a className="el" href="#a13ca13a16564a1d19aa4572618771f7b">tableName</a></td>
      </tr>

      <tr className="memdesc:a13ca13a16564a1d19aa4572618771f7b">
        <td className="mdescLeft"> </td>
        <td className="mdescRight">Name of the existing table on which the projection is to be applied, in \[ schema\_name. ]table\_name format, using standard <a href="/content/concepts/tables/#table-name-resolution" target="_top">name resolution rules</a>. <br /></td>
      </tr>

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

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

      <tr className="memdesc:a6f67f184f9bbfa164eab722aa9afa002">
        <td className="mdescLeft"> </td>
        <td className="mdescRight">Name of the projection 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:a6f67f184f9bbfa164eab722aa9afa002">
        <td className="memSeparator" colSpan="2"> </td>
      </tr>

      <tr className="memitem:ac3fa6b7eb768d6fb99461057d67648cb" id="r_ac3fa6b7eb768d6fb99461057d67648cb">
        <td className="memItemLeft" align="right" valign="top">std::vector\< std::string > </td>
        <td className="memItemRight" valign="bottom"><a className="el" href="#ac3fa6b7eb768d6fb99461057d67648cb">columnNames</a></td>
      </tr>

      <tr className="memdesc:ac3fa6b7eb768d6fb99461057d67648cb">
        <td className="mdescLeft"> </td>
        <td className="mdescRight">List of columns from <a className="el" href="#a13ca13a16564a1d19aa4572618771f7b">tableName</a> to be included in the projection. <br /></td>
      </tr>

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

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

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

      <tr className="separator:ab3da6e601e28243ad11370543365571b">
        <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#aab22a8ee1b42ec6fa1acfc3b2f70cf4c">GPUdb::createProjection</a>. </p>
      <p>Creates a new <a href="/content/concepts/projections/" target="_top">projection</a> of an existing table. A projection represents a subset of the columns (potentially including derived columns) of a table.</p>
      <p>For projection details and examples, see <a href="/content/concepts/projections/" target="_top">Projections</a>. For limitations, see <a href="/content/concepts/projections/#limitations-and-cautions" target="_top">Projection Limitations and Cautions</a>.</p>
      <p><a href="/content/concepts/window/" target="_top">Window functions</a>, which can perform operations like moving averages, are available through this endpoint as well as <a className="el" href="/content/api/cpp/classgpudb_1_1GPUdb#aaf391f0f2e29974de30e9aa91dbed1ef">GPUdb::getRecordsByColumn</a>.</p>
      <p>A projection can be created with a different <a href="/content/concepts/tables/#shard-keys" target="_top">shard key</a> than the source table. By specifying <a className="el" href="/content/api/cpp/namespacegpudb#abea2a2041dabe1a1ae3c209ee1889121">shard\_key</a>, 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.</p>
      <p>If <a className="el" href="#a13ca13a16564a1d19aa4572618771f7b">tableName</a> is empty, selection is performed against a single-row virtual table. This can be useful in executing temporal (<a href="/content/concepts/expressions/#date-time-functions" target="_top">NOW()</a>), identity (<a href="/content/concepts/expressions/#user-security-functions" target="_top">USER()</a>), or constant-based functions (<a href="/content/concepts/expressions/#scalar-functions" target="_top">GEODIST(-77.11, 38.88, -71.06, 42.36)</a>). </p>
      <p className="definition">Definition at line <a className="el" href="/content/api/cpp/create__projection_8h_source#l00049">49</a> of file <a className="el" href="/content/api/cpp/create__projection_8h_source">create\_projection.h</a>.</p>
    </div>

    <h2 className="groupheader">Constructor & Destructor Documentation</h2>
    <h2 className="memtitle"><span className="permalink"><a href="#a7fda62880500749fd4d37f3eae9337de">◆ </a></span>CreateProjectionRequest() <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::CreateProjectionRequest::CreateProjectionRequest </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_1CreateProjectionRequest" title="A set of parameters for GPUdb::createProjection.">CreateProjectionRequest</a> object with default parameters. </p>
        <p className="definition">Definition at line <a className="el" href="/content/api/cpp/create__projection_8h_source#l00054">54</a> of file <a className="el" href="/content/api/cpp/create__projection_8h_source">create\_projection.h</a>.</p>
      </div>
    </div>

    <h2 className="memtitle"><span className="permalink"><a href="#ae9b5755a5d139068bc7d0a963312afc6">◆ </a></span>CreateProjectionRequest() <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::CreateProjectionRequest::CreateProjectionRequest </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">projectionName\_</span></span>, </td>
                </tr>

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

                  <td />

                  <td className="paramtype">const std::vector\< std::string > &</td>
                  <td className="paramname"><span className="paramname"><span className="em">columnNames\_</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_1CreateProjectionRequest" title="A set of parameters for GPUdb::createProjection.">CreateProjectionRequest</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 existing table on which the projection is to be applied, in \[schema\_name.]table\_name format, using standard <a href="/content/concepts/tables/#table-name-resolution" target="_top">name resolution rules</a>. An empty table name creates a projection from a single-row virtual table, where columns specified should be constants or constant expressions. </td>
              </tr>

              <tr>
                <td className="paramdir">\[in]</td>
                <td className="paramname">projectionName\_</td>
                <td>Name of the projection 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>. </td>
              </tr>

              <tr>
                <td className="paramdir">\[in]</td>
                <td className="paramname">columnNames\_</td>
                <td>List of columns from <span className="em arg">tableName\_</span> to be included in the projection. Can include derived columns. Can be specified as aliased via the syntax 'column\_name as alias'. </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#ad323cb8fb4fc766b8764893c2232bd3f">create\_projection\_create\_temp\_table</a>: If <a className="el" href="/content/api/cpp/namespacegpudb#a5b599c793afdd772ef44a4215aa85cf5">true</a>, a unique temporary table name will be generated in the sys\_temp schema and used in place of <span className="em arg">projectionName\_</span>. If <a className="el" href="/content/api/cpp/namespacegpudb#aced0a3481e950bd3c122f71d428e8e03">persist</a> is <a className="el" href="/content/api/cpp/namespacegpudb#a132bd8471ab7316ece48f4a31f1ea5c2">false</a> (or unspecified), 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#a70400f2052f2827b35d61e9ced03fa79">qualified\_projection\_name</a>. Supported values:

                      <ul>
                        <li> <a className="el" href="/content/api/cpp/namespacegpudb#a5b599c793afdd772ef44a4215aa85cf5">create\_projection\_true</a> </li>
                        <li> <a className="el" href="/content/api/cpp/namespacegpudb#a132bd8471ab7316ece48f4a31f1ea5c2">create\_projection\_false</a> </li>
                      </ul>

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

                    <li> <a className="el" href="/content/api/cpp/namespacegpudb#a4b085fdf38a2720aad2dcef61baa782c">create\_projection\_collection\_name</a>: \[DEPRECATED–please specify the containing schema for the projection as part of <span className="em arg">projectionName\_</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 for the projection. If the schema is non-existent, it will be automatically created. The default value is ''. </li>
                    <li> <a className="el" href="/content/api/cpp/namespacegpudb#aa1e7e946d6844a9b7b0b0842ed6f15c2">create\_projection\_expression</a>: An optional filter <a href="/content/concepts/expressions/" target="_top">expression</a> to be applied to the source table prior to the projection. The default value is ''. </li>

                    <li>
                      <a className="el" href="/content/api/cpp/namespacegpudb#ab815eac2419fe91846599262a0622361">create\_projection\_is\_replicated</a>: If <a className="el" href="/content/api/cpp/namespacegpudb#a5b599c793afdd772ef44a4215aa85cf5">true</a> then the projection will be replicated even if the source table is not. Supported values:

                      <ul>
                        <li> <a className="el" href="/content/api/cpp/namespacegpudb#a5b599c793afdd772ef44a4215aa85cf5">create\_projection\_true</a> </li>
                        <li> <a className="el" href="/content/api/cpp/namespacegpudb#a132bd8471ab7316ece48f4a31f1ea5c2">create\_projection\_false</a> </li>
                      </ul>

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

                    <li> <a className="el" href="/content/api/cpp/namespacegpudb#a8bd2323fce158a53e45ad30b25df61f1">create\_projection\_offset</a>: The number of initial results to skip (this can be useful for paging through the results). The default value is '0'. </li>
                    <li> <a className="el" href="/content/api/cpp/namespacegpudb#ab72d73c57be1daea52e642aaac568669">create\_projection\_limit</a>: The number of records to keep. The default value is '-9999'. </li>
                    <li> <a className="el" href="/content/api/cpp/namespacegpudb#a6972934c3b3fb28ad51fb2261d40a8a5">create\_projection\_order\_by</a>: Comma-separated list of the columns to be sorted by; e.g. 'timestamp asc, x desc'. The columns specified must be present in <span className="em arg">columnNames\_</span>. If any alias is given for any column name, the alias must be used, rather than the original column name. The default value is ''. </li>
                    <li> <a className="el" href="/content/api/cpp/namespacegpudb#aaa43727abcc54776d6386e197de301c0">create\_projection\_chunk\_size</a>: Indicates the number of records per chunk to be used for this projection. </li>
                    <li> <a className="el" href="/content/api/cpp/namespacegpudb#aa313b9efcb5eff6cd9bc04446023f01e">create\_projection\_chunk\_column\_max\_memory</a>: Indicates the target maximum data size for each column in a chunk to be used for this projection. </li>
                    <li> <a className="el" href="/content/api/cpp/namespacegpudb#a1b34b24735000c0dac9a374c1e6cbf4b">create\_projection\_chunk\_max\_memory</a>: Indicates the target maximum data size for all columns in a chunk to be used for this projection. </li>
                    <li> <a className="el" href="/content/api/cpp/namespacegpudb#aeb30765f15c28f2fa32343f25a0b3ca6">create\_projection\_create\_indexes</a>: Comma-separated list of columns on which to create indexes on the projection. The columns specified must be present in <span className="em arg">columnNames\_</span>. If any alias is given for any column name, the alias must be used, rather than the original column name. </li>
                    <li> <a className="el" href="/content/api/cpp/namespacegpudb#a4cd2591e02b4dfcdfc1547423bf8bf3c">create\_projection\_ttl</a>: Sets the <a href="/content/concepts/ttl/" target="_top">TTL</a> of the projection specified in <span className="em arg">projectionName\_</span>. </li>
                    <li> <a className="el" href="/content/api/cpp/namespacegpudb#abea2a2041dabe1a1ae3c209ee1889121">create\_projection\_shard\_key</a>: Comma-separated list of the columns to be sharded on; e.g. 'column1, column2'. The columns specified must be present in <span className="em arg">columnNames\_</span>. If any alias is given for any column name, the alias must be used, rather than the original column name. The default value is ''. </li>

                    <li>
                      <a className="el" href="/content/api/cpp/namespacegpudb#aced0a3481e950bd3c122f71d428e8e03">create\_projection\_persist</a>: If <a className="el" href="/content/api/cpp/namespacegpudb#a5b599c793afdd772ef44a4215aa85cf5">true</a>, then the projection specified in <span className="em arg">projectionName\_</span> will be persisted and will not expire unless a <a className="el" href="/content/api/cpp/namespacegpudb#a4cd2591e02b4dfcdfc1547423bf8bf3c">ttl</a> is specified. If <a className="el" href="/content/api/cpp/namespacegpudb#a132bd8471ab7316ece48f4a31f1ea5c2">false</a>, then the projection will be an in-memory table and will expire unless a <a className="el" href="/content/api/cpp/namespacegpudb#a4cd2591e02b4dfcdfc1547423bf8bf3c">ttl</a> is specified otherwise. Supported values:

                      <ul>
                        <li> <a className="el" href="/content/api/cpp/namespacegpudb#a5b599c793afdd772ef44a4215aa85cf5">create\_projection\_true</a> </li>
                        <li> <a className="el" href="/content/api/cpp/namespacegpudb#a132bd8471ab7316ece48f4a31f1ea5c2">create\_projection\_false</a> </li>
                      </ul>

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

                    <li>
                      <a className="el" href="/content/api/cpp/namespacegpudb#a9bfd58584a38ba5bd2502f6ebe323553">create\_projection\_preserve\_dict\_encoding</a>: If <a className="el" href="/content/api/cpp/namespacegpudb#a5b599c793afdd772ef44a4215aa85cf5">true</a>, then columns that were dict encoded in the source table will be dict encoded in the projection. Supported values:

                      <ul>
                        <li> <a className="el" href="/content/api/cpp/namespacegpudb#a5b599c793afdd772ef44a4215aa85cf5">create\_projection\_true</a> </li>
                        <li> <a className="el" href="/content/api/cpp/namespacegpudb#a132bd8471ab7316ece48f4a31f1ea5c2">create\_projection\_false</a> </li>
                      </ul>

                      The default value is <a className="el" href="/content/api/cpp/namespacegpudb#a5b599c793afdd772ef44a4215aa85cf5">create\_projection\_true</a>.
                    </li>

                    <li>
                      <a className="el" href="/content/api/cpp/namespacegpudb#a0f7a1a2a2f8f7ad907b77a97fbe614d4">create\_projection\_retain\_partitions</a>: Determines whether the created projection will retain the partitioning scheme from the source table. Supported values:

                      <ul>
                        <li> <a className="el" href="/content/api/cpp/namespacegpudb#a5b599c793afdd772ef44a4215aa85cf5">create\_projection\_true</a> </li>
                        <li> <a className="el" href="/content/api/cpp/namespacegpudb#a132bd8471ab7316ece48f4a31f1ea5c2">create\_projection\_false</a> </li>
                      </ul>

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

                    <li>
                      <a className="el" href="/content/api/cpp/namespacegpudb#a6eb04a54ac1088f6155aa32b08de9b5b">create\_projection\_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#a3216960c70be6e192df2f470a8aa5bae">create\_projection\_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#a427d3a288496a1f9d66165dd29516e66">create\_projection\_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#af43ed9f3470e4016cea676495c61a359">create\_projection\_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#afa6baa4925929e977219bfd0e5f7f91d">create\_projection\_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#adf61b29dfbdf52eb4ab3ff28cb2a7d71">create\_projection\_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#ad9aa7ee48f73a2ddd77bcf4857d38bd4">create\_projection\_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#a6806df087c3e7bbc50dda81c5a994de5">partition\_definitions</a>. </li>
                    <li> <a className="el" href="/content/api/cpp/namespacegpudb#a6806df087c3e7bbc50dda81c5a994de5">create\_projection\_partition\_definitions</a>: Comma-separated list of partition definitions, whose format depends on the choice of <a className="el" href="/content/api/cpp/namespacegpudb#a6eb04a54ac1088f6155aa32b08de9b5b">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#ad8503d1127cb5f1ede637a58b112be0b">create\_projection\_is\_automatic\_partition</a>: If <a className="el" href="/content/api/cpp/namespacegpudb#a5b599c793afdd772ef44a4215aa85cf5">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#a5b599c793afdd772ef44a4215aa85cf5">create\_projection\_true</a> </li>
                        <li> <a className="el" href="/content/api/cpp/namespacegpudb#a132bd8471ab7316ece48f4a31f1ea5c2">create\_projection\_false</a> </li>
                      </ul>

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

                    <li> <a className="el" href="/content/api/cpp/namespacegpudb#a1da4e54de8e2da9144f74c303828fd09">create\_projection\_view\_id</a>: ID of view of which this projection is a member. The default value is ''. </li>
                    <li> <a className="el" href="/content/api/cpp/namespacegpudb#a814c8b268a956eea43b922924515d917">create\_projection\_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#a2e2df57c85dbedffcc3fc56eb7b909e3">create\_projection\_compression\_codec</a>: The default <a href="/content/concepts/column_compression/" target="_top">compression codec</a> for the projection's columns. </li>
                    <li> <a className="el" href="/content/api/cpp/namespacegpudb#a51bcd0b84806cb805114dd4d97edf121">create\_projection\_join\_window\_functions</a>: If set, window functions which require a reshard will be computed separately and joined back together, if the width of the projection is greater than the join\_window\_functions\_threshold. The default value is 'true'. </li>
                    <li> <a className="el" href="/content/api/cpp/namespacegpudb#a2ce4c6dee31d7f25a2d23bf6be6e5d2a">create\_projection\_join\_window\_functions\_threshold</a>: If the projection is greater than this width (in bytes), then window functions which require a reshard will be computed separately and joined back together. The default value is ''. </li>
                    <li> <a className="el" href="/content/api/cpp/namespacegpudb#a9ad4e698261092bb1f6cc8d10ce3c5f0">create\_projection\_qualify\_filter</a>: An optional filter <a href="/content/concepts/expressions/" target="_top">expression</a> applied to the projection after window function evaluation, equivalent to a SQL QUALIFY clause. May reference window function aliases as well as any other column in the projection. Rows for which the expression evaluates to false (or NULL) are removed from the projection. The default value is ''. </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__projection_8h_source#l00432">432</a> of file <a className="el" href="/content/api/cpp/create__projection_8h_source">create\_projection.h</a>.</p>
      </div>
    </div>

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

    <div className="memitem">
      <div className="memproto">
        <table className="memname">
          <tr>
            <td className="memname">std::vector\<std::string> gpudb::CreateProjectionRequest::columnNames</td>
          </tr>
        </table>
      </div>

      <div className="memdoc">
        <p>List of columns from <a className="el" href="#a13ca13a16564a1d19aa4572618771f7b">tableName</a> to be included in the projection. </p>
        <p>Can include derived columns. Can be specified as aliased via the syntax 'column\_name as alias'. </p>
        <p className="definition">Definition at line <a className="el" href="/content/api/cpp/create__projection_8h_source#l00465">465</a> of file <a className="el" href="/content/api/cpp/create__projection_8h_source">create\_projection.h</a>.</p>
      </div>
    </div>

    <h2 className="memtitle"><span className="permalink"><a href="#ab3da6e601e28243ad11370543365571b">◆ </a></span>options</h2>

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

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

        <ul>
          <li>
            <a className="el" href="/content/api/cpp/namespacegpudb#ad323cb8fb4fc766b8764893c2232bd3f">create\_projection\_create\_temp\_table</a>: If <a className="el" href="/content/api/cpp/namespacegpudb#a5b599c793afdd772ef44a4215aa85cf5">true</a>, a unique temporary table name will be generated in the sys\_temp schema and used in place of <a className="el" href="#a6f67f184f9bbfa164eab722aa9afa002">projectionName</a>. If <a className="el" href="/content/api/cpp/namespacegpudb#aced0a3481e950bd3c122f71d428e8e03">persist</a> is <a className="el" href="/content/api/cpp/namespacegpudb#a132bd8471ab7316ece48f4a31f1ea5c2">false</a> (or unspecified), 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#a70400f2052f2827b35d61e9ced03fa79">qualified\_projection\_name</a>. Supported values:

            <ul>
              <li> <a className="el" href="/content/api/cpp/namespacegpudb#a5b599c793afdd772ef44a4215aa85cf5">create\_projection\_true</a> </li>
              <li> <a className="el" href="/content/api/cpp/namespacegpudb#a132bd8471ab7316ece48f4a31f1ea5c2">create\_projection\_false</a> </li>
            </ul>

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

          <li> <a className="el" href="/content/api/cpp/namespacegpudb#a4b085fdf38a2720aad2dcef61baa782c">create\_projection\_collection\_name</a>: \[DEPRECATED–please specify the containing schema for the projection as part of <a className="el" href="#a6f67f184f9bbfa164eab722aa9afa002">projectionName</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 for the projection. If the schema is non-existent, it will be automatically created. The default value is ''. </li>
          <li> <a className="el" href="/content/api/cpp/namespacegpudb#aa1e7e946d6844a9b7b0b0842ed6f15c2">create\_projection\_expression</a>: An optional filter <a href="/content/concepts/expressions/" target="_top">expression</a> to be applied to the source table prior to the projection. The default value is ''. </li>

          <li>
            <a className="el" href="/content/api/cpp/namespacegpudb#ab815eac2419fe91846599262a0622361">create\_projection\_is\_replicated</a>: If <a className="el" href="/content/api/cpp/namespacegpudb#a5b599c793afdd772ef44a4215aa85cf5">true</a> then the projection will be replicated even if the source table is not. Supported values:

            <ul>
              <li> <a className="el" href="/content/api/cpp/namespacegpudb#a5b599c793afdd772ef44a4215aa85cf5">create\_projection\_true</a> </li>
              <li> <a className="el" href="/content/api/cpp/namespacegpudb#a132bd8471ab7316ece48f4a31f1ea5c2">create\_projection\_false</a> </li>
            </ul>

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

          <li> <a className="el" href="/content/api/cpp/namespacegpudb#a8bd2323fce158a53e45ad30b25df61f1">create\_projection\_offset</a>: The number of initial results to skip (this can be useful for paging through the results). The default value is '0'. </li>
          <li> <a className="el" href="/content/api/cpp/namespacegpudb#ab72d73c57be1daea52e642aaac568669">create\_projection\_limit</a>: The number of records to keep. The default value is '-9999'. </li>
          <li> <a className="el" href="/content/api/cpp/namespacegpudb#a6972934c3b3fb28ad51fb2261d40a8a5">create\_projection\_order\_by</a>: Comma-separated list of the columns to be sorted by; e.g. 'timestamp asc, x desc'. The columns specified must be present in <a className="el" href="#ac3fa6b7eb768d6fb99461057d67648cb">columnNames</a>. If any alias is given for any column name, the alias must be used, rather than the original column name. The default value is ''. </li>
          <li> <a className="el" href="/content/api/cpp/namespacegpudb#aaa43727abcc54776d6386e197de301c0">create\_projection\_chunk\_size</a>: Indicates the number of records per chunk to be used for this projection. </li>
          <li> <a className="el" href="/content/api/cpp/namespacegpudb#aa313b9efcb5eff6cd9bc04446023f01e">create\_projection\_chunk\_column\_max\_memory</a>: Indicates the target maximum data size for each column in a chunk to be used for this projection. </li>
          <li> <a className="el" href="/content/api/cpp/namespacegpudb#a1b34b24735000c0dac9a374c1e6cbf4b">create\_projection\_chunk\_max\_memory</a>: Indicates the target maximum data size for all columns in a chunk to be used for this projection. </li>
          <li> <a className="el" href="/content/api/cpp/namespacegpudb#aeb30765f15c28f2fa32343f25a0b3ca6">create\_projection\_create\_indexes</a>: Comma-separated list of columns on which to create indexes on the projection. The columns specified must be present in <a className="el" href="#ac3fa6b7eb768d6fb99461057d67648cb">columnNames</a>. If any alias is given for any column name, the alias must be used, rather than the original column name. </li>
          <li> <a className="el" href="/content/api/cpp/namespacegpudb#a4cd2591e02b4dfcdfc1547423bf8bf3c">create\_projection\_ttl</a>: Sets the <a href="/content/concepts/ttl/" target="_top">TTL</a> of the projection specified in <a className="el" href="#a6f67f184f9bbfa164eab722aa9afa002">projectionName</a>. </li>
          <li> <a className="el" href="/content/api/cpp/namespacegpudb#abea2a2041dabe1a1ae3c209ee1889121">create\_projection\_shard\_key</a>: Comma-separated list of the columns to be sharded on; e.g. 'column1, column2'. The columns specified must be present in <a className="el" href="#ac3fa6b7eb768d6fb99461057d67648cb">columnNames</a>. If any alias is given for any column name, the alias must be used, rather than the original column name. The default value is ''. </li>

          <li>
            <a className="el" href="/content/api/cpp/namespacegpudb#aced0a3481e950bd3c122f71d428e8e03">create\_projection\_persist</a>: If <a className="el" href="/content/api/cpp/namespacegpudb#a5b599c793afdd772ef44a4215aa85cf5">true</a>, then the projection specified in <a className="el" href="#a6f67f184f9bbfa164eab722aa9afa002">projectionName</a> will be persisted and will not expire unless a <a className="el" href="/content/api/cpp/namespacegpudb#a4cd2591e02b4dfcdfc1547423bf8bf3c">ttl</a> is specified. If <a className="el" href="/content/api/cpp/namespacegpudb#a132bd8471ab7316ece48f4a31f1ea5c2">false</a>, then the projection will be an in-memory table and will expire unless a <a className="el" href="/content/api/cpp/namespacegpudb#a4cd2591e02b4dfcdfc1547423bf8bf3c">ttl</a> is specified otherwise. Supported values:

            <ul>
              <li> <a className="el" href="/content/api/cpp/namespacegpudb#a5b599c793afdd772ef44a4215aa85cf5">create\_projection\_true</a> </li>
              <li> <a className="el" href="/content/api/cpp/namespacegpudb#a132bd8471ab7316ece48f4a31f1ea5c2">create\_projection\_false</a> </li>
            </ul>

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

          <li>
            <a className="el" href="/content/api/cpp/namespacegpudb#a9bfd58584a38ba5bd2502f6ebe323553">create\_projection\_preserve\_dict\_encoding</a>: If <a className="el" href="/content/api/cpp/namespacegpudb#a5b599c793afdd772ef44a4215aa85cf5">true</a>, then columns that were dict encoded in the source table will be dict encoded in the projection. Supported values:

            <ul>
              <li> <a className="el" href="/content/api/cpp/namespacegpudb#a5b599c793afdd772ef44a4215aa85cf5">create\_projection\_true</a> </li>
              <li> <a className="el" href="/content/api/cpp/namespacegpudb#a132bd8471ab7316ece48f4a31f1ea5c2">create\_projection\_false</a> </li>
            </ul>

            The default value is <a className="el" href="/content/api/cpp/namespacegpudb#a5b599c793afdd772ef44a4215aa85cf5">create\_projection\_true</a>.
          </li>

          <li>
            <a className="el" href="/content/api/cpp/namespacegpudb#a0f7a1a2a2f8f7ad907b77a97fbe614d4">create\_projection\_retain\_partitions</a>: Determines whether the created projection will retain the partitioning scheme from the source table. Supported values:

            <ul>
              <li> <a className="el" href="/content/api/cpp/namespacegpudb#a5b599c793afdd772ef44a4215aa85cf5">create\_projection\_true</a> </li>
              <li> <a className="el" href="/content/api/cpp/namespacegpudb#a132bd8471ab7316ece48f4a31f1ea5c2">create\_projection\_false</a> </li>
            </ul>

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

          <li>
            <a className="el" href="/content/api/cpp/namespacegpudb#a6eb04a54ac1088f6155aa32b08de9b5b">create\_projection\_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#a3216960c70be6e192df2f470a8aa5bae">create\_projection\_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#a427d3a288496a1f9d66165dd29516e66">create\_projection\_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#af43ed9f3470e4016cea676495c61a359">create\_projection\_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#afa6baa4925929e977219bfd0e5f7f91d">create\_projection\_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#adf61b29dfbdf52eb4ab3ff28cb2a7d71">create\_projection\_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#ad9aa7ee48f73a2ddd77bcf4857d38bd4">create\_projection\_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#a6806df087c3e7bbc50dda81c5a994de5">partition\_definitions</a>. </li>
          <li> <a className="el" href="/content/api/cpp/namespacegpudb#a6806df087c3e7bbc50dda81c5a994de5">create\_projection\_partition\_definitions</a>: Comma-separated list of partition definitions, whose format depends on the choice of <a className="el" href="/content/api/cpp/namespacegpudb#a6eb04a54ac1088f6155aa32b08de9b5b">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#ad8503d1127cb5f1ede637a58b112be0b">create\_projection\_is\_automatic\_partition</a>: If <a className="el" href="/content/api/cpp/namespacegpudb#a5b599c793afdd772ef44a4215aa85cf5">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#a5b599c793afdd772ef44a4215aa85cf5">create\_projection\_true</a> </li>
              <li> <a className="el" href="/content/api/cpp/namespacegpudb#a132bd8471ab7316ece48f4a31f1ea5c2">create\_projection\_false</a> </li>
            </ul>

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

          <li> <a className="el" href="/content/api/cpp/namespacegpudb#a1da4e54de8e2da9144f74c303828fd09">create\_projection\_view\_id</a>: ID of view of which this projection is a member. The default value is ''. </li>
          <li> <a className="el" href="/content/api/cpp/namespacegpudb#a814c8b268a956eea43b922924515d917">create\_projection\_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#a2e2df57c85dbedffcc3fc56eb7b909e3">create\_projection\_compression\_codec</a>: The default <a href="/content/concepts/column_compression/" target="_top">compression codec</a> for the projection's columns. </li>
          <li> <a className="el" href="/content/api/cpp/namespacegpudb#a51bcd0b84806cb805114dd4d97edf121">create\_projection\_join\_window\_functions</a>: If set, window functions which require a reshard will be computed separately and joined back together, if the width of the projection is greater than the join\_window\_functions\_threshold. The default value is 'true'. </li>
          <li> <a className="el" href="/content/api/cpp/namespacegpudb#a2ce4c6dee31d7f25a2d23bf6be6e5d2a">create\_projection\_join\_window\_functions\_threshold</a>: If the projection is greater than this width (in bytes), then window functions which require a reshard will be computed separately and joined back together. The default value is ''. </li>
          <li> <a className="el" href="/content/api/cpp/namespacegpudb#a9ad4e698261092bb1f6cc8d10ce3c5f0">create\_projection\_qualify\_filter</a>: An optional filter <a href="/content/concepts/expressions/" target="_top">expression</a> applied to the projection after window function evaluation, equivalent to a SQL QUALIFY clause. May reference window function aliases as well as any other column in the projection. Rows for which the expression evaluates to false (or NULL) are removed from the projection. The default value is ''. </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__projection_8h_source#l00707">707</a> of file <a className="el" href="/content/api/cpp/create__projection_8h_source">create\_projection.h</a>.</p>
      </div>
    </div>

    <h2 className="memtitle"><span className="permalink"><a href="#a6f67f184f9bbfa164eab722aa9afa002">◆ </a></span>projectionName</h2>

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

      <div className="memdoc">
        <p>Name of the projection 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 className="definition">Definition at line <a className="el" href="/content/api/cpp/create__projection_8h_source#l00458">458</a> of file <a className="el" href="/content/api/cpp/create__projection_8h_source">create\_projection.h</a>.</p>
      </div>
    </div>

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

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

      <div className="memdoc">
        <p>Name of the existing table on which the projection is to be applied, in \[ schema\_name. ]table\_name format, using standard <a href="/content/concepts/tables/#table-name-resolution" target="_top">name resolution rules</a>. </p>
        <p>An empty table name creates a projection from a single-row virtual table, where columns specified should be constants or constant expressions. </p>
        <p className="definition">Definition at line <a className="el" href="/content/api/cpp/create__projection_8h_source#l00448">448</a> of file <a className="el" href="/content/api/cpp/create__projection_8h_source">create\_projection.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__projection_8h_source">create\_projection.h</a></li>
    </ul>
  </div>
</div>
