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

# executeProc

<div className="kinetica-doxygen">
  <div id="aec2cf18c6185bf22d4fa351019b9924e" />

  <h2 className="memtitle"><span className="permalink"><a href="#aec2cf18c6185bf22d4fa351019b9924e">◆ </a></span>executeProc() <span className="overload">\[1/4]</span></h2>

  <div className="memitem">
    <div className="memproto">
      <table className="memname">
        <tr>
          <td className="memname"><a className="el" href="/content/api/cpp/structgpudb_1_1ExecuteProcResponse">ExecuteProcResponse</a> gpudb::GPUdb::executeProc </td>
          <td>(</td>
          <td className="paramtype">const <a className="el" href="/content/api/cpp/structgpudb_1_1ExecuteProcRequest">ExecuteProcRequest</a> &</td>
          <td className="paramname"><span className="paramname"><span className="em">request\_</span></span></td>
          <td>)</td>
          <td> const</td>
        </tr>
      </table>
    </div>

    <div className="memdoc">
      <p>Executes a proc. </p>
      <p>This endpoint is asynchronous and does not wait for the proc to complete before returning.</p>
      <p>If the proc being executed is distributed, <a className="el" href="/content/api/cpp/structgpudb_1_1ExecuteProcRequest#a25c972ab3d77a44d9fb6351f421f2ddf">inputTableNames</a> and <a className="el" href="/content/api/cpp/structgpudb_1_1ExecuteProcRequest#a6aa3d53ecdf763b74bf7156977dbd9e2">inputColumnNames</a> may be passed to the proc to use for reading data, and <a className="el" href="/content/api/cpp/structgpudb_1_1ExecuteProcRequest#a35ea220760e3f98e614f82775f3188c9">outputTableNames</a> may be passed to the proc to use for writing data.</p>
      <p>If the proc being executed is non-distributed, these table parameters will be ignored.</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">request\_</td>
              <td><a className="el" href="/content/api/cpp/structgpudb_1_1ExecuteProcRequest">Request</a> object containing the parameters for the operation.</td>
            </tr>
          </table>
        </div>
      </div>

      <div className="dl section return">
        <div className="dt">Returns</div>
        <div className="dd"><a className="el" href="/content/api/cpp/structgpudb_1_1ExecuteProcResponse">Response</a> object containing the result of the operation. </div>
      </div>
    </div>
  </div>

  <div id="a2a61a65eada999d993bcb1bae69656ee" />

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

  <div className="memitem">
    <div className="memproto">
      <table className="memname">
        <tr>
          <td className="memname"><a className="el" href="/content/api/cpp/structgpudb_1_1ExecuteProcResponse">ExecuteProcResponse</a> & gpudb::GPUdb::executeProc </td>
          <td>(</td>
          <td className="paramtype">const <a className="el" href="/content/api/cpp/structgpudb_1_1ExecuteProcRequest">ExecuteProcRequest</a> &</td>
          <td className="paramname"><span className="paramname"><span className="em">request\_</span></span>, </td>
        </tr>

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

          <td />

          <td className="paramtype"><a className="el" href="/content/api/cpp/structgpudb_1_1ExecuteProcResponse">ExecuteProcResponse</a> &</td>
          <td className="paramname"><span className="paramname"><span className="em">response\_</span></span> ) const</td>
        </tr>
      </table>
    </div>

    <div className="memdoc">
      <p>Executes a proc. </p>
      <p>This endpoint is asynchronous and does not wait for the proc to complete before returning.</p>
      <p>If the proc being executed is distributed, <a className="el" href="/content/api/cpp/structgpudb_1_1ExecuteProcRequest#a25c972ab3d77a44d9fb6351f421f2ddf">inputTableNames</a> and <a className="el" href="/content/api/cpp/structgpudb_1_1ExecuteProcRequest#a6aa3d53ecdf763b74bf7156977dbd9e2">inputColumnNames</a> may be passed to the proc to use for reading data, and <a className="el" href="/content/api/cpp/structgpudb_1_1ExecuteProcRequest#a35ea220760e3f98e614f82775f3188c9">outputTableNames</a> may be passed to the proc to use for writing data.</p>
      <p>If the proc being executed is non-distributed, these table parameters will be ignored.</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">request\_</td>
              <td><a className="el" href="/content/api/cpp/structgpudb_1_1ExecuteProcRequest">Request</a> object containing the parameters for the operation. </td>
            </tr>

            <tr>
              <td className="paramdir">\[out]</td>
              <td className="paramname">response\_</td>
              <td><a className="el" href="/content/api/cpp/structgpudb_1_1ExecuteProcResponse">Response</a> object containing the results of the operation.</td>
            </tr>
          </table>
        </div>
      </div>

      <div className="dl section return">
        <div className="dt">Returns</div>
        <div className="dd"><a className="el" href="/content/api/cpp/structgpudb_1_1ExecuteProcResponse">Response</a> object containing the result of the operation (initially passed in by reference). </div>
      </div>
    </div>
  </div>

  <div id="a19f569cb61a53022021bbfd9e031468d" />

  <h2 className="memtitle"><span className="permalink"><a href="#a19f569cb61a53022021bbfd9e031468d">◆ </a></span>executeProc() <span className="overload">\[3/4]</span></h2>

  <div className="memitem">
    <div className="memproto">
      <table className="memname">
        <tr>
          <td className="memname"><a className="el" href="/content/api/cpp/structgpudb_1_1ExecuteProcResponse">ExecuteProcResponse</a> gpudb::GPUdb::executeProc </td>
          <td>(</td>
          <td className="paramtype">const std::string &</td>
          <td className="paramname"><span className="paramname"><span className="em">procName</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">params</span></span>, </td>
        </tr>

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

          <td />

          <td className="paramtype">const std::map\< std::string, std::vector\< uint8\_t > > &</td>
          <td className="paramname"><span className="paramname"><span className="em">binParams</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">inputTableNames</span></span>, </td>
        </tr>

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

          <td />

          <td className="paramtype">const std::map\< std::string, std::vector\< std::string > > &</td>
          <td className="paramname"><span className="paramname"><span className="em">inputColumnNames</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">outputTableNames</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> ) const</td>
        </tr>
      </table>
    </div>

    <div className="memdoc">
      <p>Executes a proc. </p>
      <p>This endpoint is asynchronous and does not wait for the proc to complete before returning.</p>
      <p>If the proc being executed is distributed, <span className="em arg">inputTableNames</span> and <span className="em arg">inputColumnNames</span> may be passed to the proc to use for reading data, and <span className="em arg">outputTableNames</span> may be passed to the proc to use for writing data.</p>
      <p>If the proc being executed is non-distributed, these table parameters will be ignored.</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">procName</td>
              <td>Name of the proc to execute. Must be the name of a currently existing proc. </td>
            </tr>

            <tr>
              <td className="paramdir">\[in]</td>
              <td className="paramname">params</td>
              <td>A map containing named parameters to pass to the proc. Each key/value pair specifies the name of a parameter and its value. The default value is an empty map. </td>
            </tr>

            <tr>
              <td className="paramdir">\[in]</td>
              <td className="paramname">binParams</td>
              <td>A map containing named binary parameters to pass to the proc. Each key/value pair specifies the name of a parameter and its value. The default value is an empty map. </td>
            </tr>

            <tr>
              <td className="paramdir">\[in]</td>
              <td className="paramname">inputTableNames</td>
              <td>Names of the tables containing data to be passed to the proc. Each name specified must be the name of a currently existing table, in \[schema\_name.]table\_name format, using standard <a href="/content/concepts/tables/#table-name-resolution" target="_top">name resolution rules</a>. If no table names are specified, no data will be passed to the proc. This parameter is ignored if the proc has a non-distributed execution mode. The default value is an empty vector. </td>
            </tr>

            <tr>
              <td className="paramdir">\[in]</td>
              <td className="paramname">inputColumnNames</td>
              <td>Map of table names from <span className="em arg">inputTableNames</span> to lists of names of columns from those tables that will be passed to the proc. Each column name specified must be the name of an existing column in the corresponding table. If a table name from <span className="em arg">inputTableNames</span> is not included, all columns from that table will be passed to the proc. This parameter is ignored if the proc has a non-distributed execution mode. The default value is an empty map. </td>
            </tr>

            <tr>
              <td className="paramdir">\[in]</td>
              <td className="paramname">outputTableNames</td>
              <td>Names of the tables to which output data from the proc will be written, each 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>. If a specified table does not exist, it will automatically be created with the same schema as the corresponding table (by order) from <span className="em arg">inputTableNames</span>, excluding any primary and shard keys. If a specified table is a non-persistent result table, it must not have primary or shard keys. If no table names are specified, no output data can be returned from the proc. This parameter is ignored if the proc has a non-distributed execution mode. The default value is an empty vector. </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#aba9eb12afe1503933120b7bf64a7e346">execute\_proc\_cache\_input</a>: No longer supported; option will be ignored. The default value is ''. </li>
                  <li> <a className="el" href="/content/api/cpp/namespacegpudb#ad7211ebc76981c8c72d786d0fd2643dd">execute\_proc\_use\_cached\_input</a>: No longer supported; option will be ignored. The default value is ''. </li>
                  <li> <a className="el" href="/content/api/cpp/namespacegpudb#acf184a4291134ee67002d73c05e2d52a">execute\_proc\_run\_tag</a>: A string that, if not empty, can be used in subsequent calls to <a className="el" href="#a13497a80667b878cad9e5e6db04092d9">showProcStatus</a> or <a className="el" href="#a8272ee33e4bfe2ef6c5d225a7f151ada">killProc</a> to identify the proc instance. The default value is ''. </li>
                  <li> <a className="el" href="/content/api/cpp/namespacegpudb#a696f20b78bdb37031a10510c6b99ed1a">execute\_proc\_max\_output\_lines</a>: The maximum number of lines of output from stdout and stderr to return via <a className="el" href="#a13497a80667b878cad9e5e6db04092d9">showProcStatus</a>. If the number of lines output exceeds the maximum, earlier lines are discarded. The default value is '100'. </li>

                  <li>
                    <a className="el" href="/content/api/cpp/namespacegpudb#af73f384cadee446e2a1d258d74bb83bd">execute\_proc\_execute\_at\_startup</a>: If <a className="el" href="/content/api/cpp/namespacegpudb#a4da8f3f4e4c507d4ba6bf1d496959b32">true</a>, an instance of the proc will run when the database is started instead of running immediately. The <a className="el" href="/content/api/cpp/structgpudb_1_1ExecuteProcResponse#a8b7bda3af69d5ce923ea4d16dfe67e6c">runId</a> can be retrieved using <a className="el" href="#a4ff6de0d6b70a356a1995b973c9811dc">showProc</a> and used in <a className="el" href="#a13497a80667b878cad9e5e6db04092d9">showProcStatus</a>. Supported values:

                    <ul>
                      <li> <a className="el" href="/content/api/cpp/namespacegpudb#a4da8f3f4e4c507d4ba6bf1d496959b32">execute\_proc\_true</a> </li>
                      <li> <a className="el" href="/content/api/cpp/namespacegpudb#a492752231307347ef507e4e0680fc967">execute\_proc\_false</a> </li>
                    </ul>

                    The default value is <a className="el" href="/content/api/cpp/namespacegpudb#a492752231307347ef507e4e0680fc967">execute\_proc\_false</a>.
                  </li>

                  <li> <a className="el" href="/content/api/cpp/namespacegpudb#ada77f22449cbf9e230fbb1d250698e1e">execute\_proc\_execute\_at\_startup\_as</a>: Sets the alternate user name to execute this proc instance as when <a className="el" href="/content/api/cpp/namespacegpudb#af73f384cadee446e2a1d258d74bb83bd">execute\_at\_startup</a> is <a className="el" href="/content/api/cpp/namespacegpudb#a4da8f3f4e4c507d4ba6bf1d496959b32">true</a>. The default value is ''. </li>
                </ul>

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

      <div className="dl section return">
        <div className="dt">Returns</div>
        <div className="dd"><a className="el" href="/content/api/cpp/structgpudb_1_1ExecuteProcResponse">Response</a> object containing the result of the operation. </div>
      </div>
    </div>
  </div>

  <div id="a6755a1b383ff5e0fbfb163365bcfa7bc" />

  <h2 className="memtitle"><span className="permalink"><a href="#a6755a1b383ff5e0fbfb163365bcfa7bc">◆ </a></span>executeProc() <span className="overload">\[4/4]</span></h2>

  <div className="memitem">
    <div className="memproto">
      <table className="memname">
        <tr>
          <td className="memname"><a className="el" href="/content/api/cpp/structgpudb_1_1ExecuteProcResponse">ExecuteProcResponse</a> & gpudb::GPUdb::executeProc </td>
          <td>(</td>
          <td className="paramtype">const std::string &</td>
          <td className="paramname"><span className="paramname"><span className="em">procName</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">params</span></span>, </td>
        </tr>

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

          <td />

          <td className="paramtype">const std::map\< std::string, std::vector\< uint8\_t > > &</td>
          <td className="paramname"><span className="paramname"><span className="em">binParams</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">inputTableNames</span></span>, </td>
        </tr>

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

          <td />

          <td className="paramtype">const std::map\< std::string, std::vector\< std::string > > &</td>
          <td className="paramname"><span className="paramname"><span className="em">inputColumnNames</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">outputTableNames</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>

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

          <td />

          <td className="paramtype"><a className="el" href="/content/api/cpp/structgpudb_1_1ExecuteProcResponse">ExecuteProcResponse</a> &</td>
          <td className="paramname"><span className="paramname"><span className="em">response\_</span></span> ) const</td>
        </tr>
      </table>
    </div>

    <div className="memdoc">
      <p>Executes a proc. </p>
      <p>This endpoint is asynchronous and does not wait for the proc to complete before returning.</p>
      <p>If the proc being executed is distributed, <span className="em arg">inputTableNames</span> and <span className="em arg">inputColumnNames</span> may be passed to the proc to use for reading data, and <span className="em arg">outputTableNames</span> may be passed to the proc to use for writing data.</p>
      <p>If the proc being executed is non-distributed, these table parameters will be ignored.</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">procName</td>
              <td>Name of the proc to execute. Must be the name of a currently existing proc. </td>
            </tr>

            <tr>
              <td className="paramdir">\[in]</td>
              <td className="paramname">params</td>
              <td>A map containing named parameters to pass to the proc. Each key/value pair specifies the name of a parameter and its value. The default value is an empty map. </td>
            </tr>

            <tr>
              <td className="paramdir">\[in]</td>
              <td className="paramname">binParams</td>
              <td>A map containing named binary parameters to pass to the proc. Each key/value pair specifies the name of a parameter and its value. The default value is an empty map. </td>
            </tr>

            <tr>
              <td className="paramdir">\[in]</td>
              <td className="paramname">inputTableNames</td>
              <td>Names of the tables containing data to be passed to the proc. Each name specified must be the name of a currently existing table, in \[schema\_name.]table\_name format, using standard <a href="/content/concepts/tables/#table-name-resolution" target="_top">name resolution rules</a>. If no table names are specified, no data will be passed to the proc. This parameter is ignored if the proc has a non-distributed execution mode. The default value is an empty vector. </td>
            </tr>

            <tr>
              <td className="paramdir">\[in]</td>
              <td className="paramname">inputColumnNames</td>
              <td>Map of table names from <span className="em arg">inputTableNames</span> to lists of names of columns from those tables that will be passed to the proc. Each column name specified must be the name of an existing column in the corresponding table. If a table name from <span className="em arg">inputTableNames</span> is not included, all columns from that table will be passed to the proc. This parameter is ignored if the proc has a non-distributed execution mode. The default value is an empty map. </td>
            </tr>

            <tr>
              <td className="paramdir">\[in]</td>
              <td className="paramname">outputTableNames</td>
              <td>Names of the tables to which output data from the proc will be written, each 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>. If a specified table does not exist, it will automatically be created with the same schema as the corresponding table (by order) from <span className="em arg">inputTableNames</span>, excluding any primary and shard keys. If a specified table is a non-persistent result table, it must not have primary or shard keys. If no table names are specified, no output data can be returned from the proc. This parameter is ignored if the proc has a non-distributed execution mode. The default value is an empty vector. </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#aba9eb12afe1503933120b7bf64a7e346">execute\_proc\_cache\_input</a>: No longer supported; option will be ignored. The default value is ''. </li>
                  <li> <a className="el" href="/content/api/cpp/namespacegpudb#ad7211ebc76981c8c72d786d0fd2643dd">execute\_proc\_use\_cached\_input</a>: No longer supported; option will be ignored. The default value is ''. </li>
                  <li> <a className="el" href="/content/api/cpp/namespacegpudb#acf184a4291134ee67002d73c05e2d52a">execute\_proc\_run\_tag</a>: A string that, if not empty, can be used in subsequent calls to <a className="el" href="#a13497a80667b878cad9e5e6db04092d9">showProcStatus</a> or <a className="el" href="#a8272ee33e4bfe2ef6c5d225a7f151ada">killProc</a> to identify the proc instance. The default value is ''. </li>
                  <li> <a className="el" href="/content/api/cpp/namespacegpudb#a696f20b78bdb37031a10510c6b99ed1a">execute\_proc\_max\_output\_lines</a>: The maximum number of lines of output from stdout and stderr to return via <a className="el" href="#a13497a80667b878cad9e5e6db04092d9">showProcStatus</a>. If the number of lines output exceeds the maximum, earlier lines are discarded. The default value is '100'. </li>

                  <li>
                    <a className="el" href="/content/api/cpp/namespacegpudb#af73f384cadee446e2a1d258d74bb83bd">execute\_proc\_execute\_at\_startup</a>: If <a className="el" href="/content/api/cpp/namespacegpudb#a4da8f3f4e4c507d4ba6bf1d496959b32">true</a>, an instance of the proc will run when the database is started instead of running immediately. The <a className="el" href="/content/api/cpp/structgpudb_1_1ExecuteProcResponse#a8b7bda3af69d5ce923ea4d16dfe67e6c">runId</a> can be retrieved using <a className="el" href="#a4ff6de0d6b70a356a1995b973c9811dc">showProc</a> and used in <a className="el" href="#a13497a80667b878cad9e5e6db04092d9">showProcStatus</a>. Supported values:

                    <ul>
                      <li> <a className="el" href="/content/api/cpp/namespacegpudb#a4da8f3f4e4c507d4ba6bf1d496959b32">execute\_proc\_true</a> </li>
                      <li> <a className="el" href="/content/api/cpp/namespacegpudb#a492752231307347ef507e4e0680fc967">execute\_proc\_false</a> </li>
                    </ul>

                    The default value is <a className="el" href="/content/api/cpp/namespacegpudb#a492752231307347ef507e4e0680fc967">execute\_proc\_false</a>.
                  </li>

                  <li> <a className="el" href="/content/api/cpp/namespacegpudb#ada77f22449cbf9e230fbb1d250698e1e">execute\_proc\_execute\_at\_startup\_as</a>: Sets the alternate user name to execute this proc instance as when <a className="el" href="/content/api/cpp/namespacegpudb#af73f384cadee446e2a1d258d74bb83bd">execute\_at\_startup</a> is <a className="el" href="/content/api/cpp/namespacegpudb#a4da8f3f4e4c507d4ba6bf1d496959b32">true</a>. The default value is ''. </li>
                </ul>

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

            <tr>
              <td className="paramdir">\[out]</td>
              <td className="paramname">response\_</td>
              <td><a className="el" href="/content/api/cpp/structgpudb_1_1ExecuteProcResponse">Response</a> object containing the results of the operation.</td>
            </tr>
          </table>
        </div>
      </div>

      <div className="dl section return">
        <div className="dt">Returns</div>
        <div className="dd"><a className="el" href="/content/api/cpp/structgpudb_1_1ExecuteProcResponse">Response</a> object containing the result of the operation (initially passed in by reference). </div>
      </div>
    </div>
  </div>
</div>
