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

# createProc

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

  <h2 className="memtitle"><span className="permalink"><a href="#aece60959dc14eef09c0a3b390ddee6ea">◆ </a></span>createProc() <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_1CreateProcResponse">CreateProcResponse</a> gpudb::GPUdb::createProc </td>
          <td>(</td>
          <td className="paramtype">const <a className="el" href="/content/api/cpp/structgpudb_1_1CreateProcRequest">CreateProcRequest</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>Creates an instance (proc) of the <a href="/content/concepts/udf/" target="_top">user-defined functions</a> (UDF) specified by the given command, options, and files, and makes it available for execution. </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_1CreateProcRequest">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_1CreateProcResponse">Response</a> object containing the result of the operation. </div>
      </div>
    </div>
  </div>

  <div id="a7d1cc69f145c8d5bfe9d49defc76f52c" />

  <h2 className="memtitle"><span className="permalink"><a href="#a7d1cc69f145c8d5bfe9d49defc76f52c">◆ </a></span>createProc() <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_1CreateProcResponse">CreateProcResponse</a> & gpudb::GPUdb::createProc </td>
          <td>(</td>
          <td className="paramtype">const <a className="el" href="/content/api/cpp/structgpudb_1_1CreateProcRequest">CreateProcRequest</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_1CreateProcResponse">CreateProcResponse</a> &</td>
          <td className="paramname"><span className="paramname"><span className="em">response\_</span></span> ) const</td>
        </tr>
      </table>
    </div>

    <div className="memdoc">
      <p>Creates an instance (proc) of the <a href="/content/concepts/udf/" target="_top">user-defined functions</a> (UDF) specified by the given command, options, and files, and makes it available for execution. </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_1CreateProcRequest">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_1CreateProcResponse">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_1CreateProcResponse">Response</a> object containing the result of the operation (initially passed in by reference). </div>
      </div>
    </div>
  </div>

  <div id="ace48ccb741aa8b5aaec6fca25b235fe0" />

  <h2 className="memtitle"><span className="permalink"><a href="#ace48ccb741aa8b5aaec6fca25b235fe0">◆ </a></span>createProc() <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_1CreateProcResponse">CreateProcResponse</a> gpudb::GPUdb::createProc </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::string &</td>
          <td className="paramname"><span className="paramname"><span className="em">executionMode</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">files</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">command</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">args</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>Creates an instance (proc) of the <a href="/content/concepts/udf/" target="_top">user-defined functions</a> (UDF) specified by the given command, options, and files, and makes it available for execution. </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 be created. Must not be the name of a currently existing proc. </td>
            </tr>

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

              <td>
                The execution mode of the proc. Supported values:

                <ul>
                  <li> <a className="el" href="/content/api/cpp/namespacegpudb#a5dd108a5fd72513cb0dd2a6f7f18f5f7">create\_proc\_distributed</a>: Input table data will be divided into data segments that are distributed across all nodes in the cluster, and the proc command will be invoked once per data segment in parallel. Output table data from each invocation will be saved to the same node as the corresponding input data. </li>
                  <li> <a className="el" href="/content/api/cpp/namespacegpudb#a188933cd80dde132f4ee0bb4778f6104">create\_proc\_nondistributed</a>: The proc command will be invoked only once per execution, and will not have direct access to any tables named as input or output table parameters in the call to <a className="el" href="#a19f569cb61a53022021bbfd9e031468d">executeProc</a>. It will, however, be able to access the database using native API calls. </li>
                </ul>

                The default value is <a className="el" href="/content/api/cpp/namespacegpudb#a5dd108a5fd72513cb0dd2a6f7f18f5f7">create\_proc\_distributed</a>.
              </td>
            </tr>

            <tr>
              <td className="paramdir">\[in]</td>
              <td className="paramname">files</td>
              <td>A map of the files that make up the proc. The keys of the map are file names, and the values are the binary contents of the files. The file names may include subdirectory names (e.g. 'subdir/file') but must not resolve to a directory above the root for the proc. Files may be loaded from existing files in KiFS. Those file names should be prefixed with the uri kifs\:// and the values in the map should be empty. The default value is an empty map. </td>
            </tr>

            <tr>
              <td className="paramdir">\[in]</td>
              <td className="paramname">command</td>
              <td>The command (excluding arguments) that will be invoked when the proc is executed. It will be invoked from the directory containing the proc <span className="em arg">files</span> and may be any command that can be resolved from that directory. It need not refer to a file actually in that directory; for example, it could be 'java' if the proc is a Java application; however, any necessary external programs must be preinstalled on every database node. If the command refers to a file in that directory, it must be preceded with './' as per Linux convention. If not specified, and exactly one file is provided in <span className="em arg">files</span>, that file will be invoked. The default value is ''. </td>
            </tr>

            <tr>
              <td className="paramdir">\[in]</td>
              <td className="paramname">args</td>
              <td>An array of command-line arguments that will be passed to <span className="em arg">command</span> when the proc is executed. 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#ace370a61742e4767311a89a0373320a3">create\_proc\_max\_concurrency\_per\_node</a>: The maximum number of concurrent instances of the proc that will be executed per node. 0 allows unlimited concurrency. The default value is '0'. </li>
                  <li> <a className="el" href="/content/api/cpp/namespacegpudb#a9d2030eee6e2495ea4984266f6778992">create\_proc\_set\_environment</a>: A python environment to use when executing the proc. Must be an existing environment, else an error will be returned. 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_1CreateProcResponse">Response</a> object containing the result of the operation. </div>
      </div>
    </div>
  </div>

  <div id="ac9fc234ac65973e64a8a832afeab6017" />

  <h2 className="memtitle"><span className="permalink"><a href="#ac9fc234ac65973e64a8a832afeab6017">◆ </a></span>createProc() <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_1CreateProcResponse">CreateProcResponse</a> & gpudb::GPUdb::createProc </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::string &</td>
          <td className="paramname"><span className="paramname"><span className="em">executionMode</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">files</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">command</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">args</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_1CreateProcResponse">CreateProcResponse</a> &</td>
          <td className="paramname"><span className="paramname"><span className="em">response\_</span></span> ) const</td>
        </tr>
      </table>
    </div>

    <div className="memdoc">
      <p>Creates an instance (proc) of the <a href="/content/concepts/udf/" target="_top">user-defined functions</a> (UDF) specified by the given command, options, and files, and makes it available for execution. </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 be created. Must not be the name of a currently existing proc. </td>
            </tr>

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

              <td>
                The execution mode of the proc. Supported values:

                <ul>
                  <li> <a className="el" href="/content/api/cpp/namespacegpudb#a5dd108a5fd72513cb0dd2a6f7f18f5f7">create\_proc\_distributed</a>: Input table data will be divided into data segments that are distributed across all nodes in the cluster, and the proc command will be invoked once per data segment in parallel. Output table data from each invocation will be saved to the same node as the corresponding input data. </li>
                  <li> <a className="el" href="/content/api/cpp/namespacegpudb#a188933cd80dde132f4ee0bb4778f6104">create\_proc\_nondistributed</a>: The proc command will be invoked only once per execution, and will not have direct access to any tables named as input or output table parameters in the call to <a className="el" href="#a19f569cb61a53022021bbfd9e031468d">executeProc</a>. It will, however, be able to access the database using native API calls. </li>
                </ul>

                The default value is <a className="el" href="/content/api/cpp/namespacegpudb#a5dd108a5fd72513cb0dd2a6f7f18f5f7">create\_proc\_distributed</a>.
              </td>
            </tr>

            <tr>
              <td className="paramdir">\[in]</td>
              <td className="paramname">files</td>
              <td>A map of the files that make up the proc. The keys of the map are file names, and the values are the binary contents of the files. The file names may include subdirectory names (e.g. 'subdir/file') but must not resolve to a directory above the root for the proc. Files may be loaded from existing files in KiFS. Those file names should be prefixed with the uri kifs\:// and the values in the map should be empty. The default value is an empty map. </td>
            </tr>

            <tr>
              <td className="paramdir">\[in]</td>
              <td className="paramname">command</td>
              <td>The command (excluding arguments) that will be invoked when the proc is executed. It will be invoked from the directory containing the proc <span className="em arg">files</span> and may be any command that can be resolved from that directory. It need not refer to a file actually in that directory; for example, it could be 'java' if the proc is a Java application; however, any necessary external programs must be preinstalled on every database node. If the command refers to a file in that directory, it must be preceded with './' as per Linux convention. If not specified, and exactly one file is provided in <span className="em arg">files</span>, that file will be invoked. The default value is ''. </td>
            </tr>

            <tr>
              <td className="paramdir">\[in]</td>
              <td className="paramname">args</td>
              <td>An array of command-line arguments that will be passed to <span className="em arg">command</span> when the proc is executed. 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#ace370a61742e4767311a89a0373320a3">create\_proc\_max\_concurrency\_per\_node</a>: The maximum number of concurrent instances of the proc that will be executed per node. 0 allows unlimited concurrency. The default value is '0'. </li>
                  <li> <a className="el" href="/content/api/cpp/namespacegpudb#a9d2030eee6e2495ea4984266f6778992">create\_proc\_set\_environment</a>: A python environment to use when executing the proc. Must be an existing environment, else an error will be returned. 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_1CreateProcResponse">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_1CreateProcResponse">Response</a> object containing the result of the operation (initially passed in by reference). </div>
      </div>
    </div>
  </div>
</div>
