> ## 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-javadoc">
  <ul className="member-list">
    <li>
      <div className="section detail" id="executeProc(com.gpudb.protocol.ExecuteProcRequest)">
        <h3>executeProc</h3>
        <div className="member-signature"><span className="modifiers">public</span> <span className="return-type"><a href="/content/api/java/com/gpudb/protocol/ExecuteProcResponse" title="class in com.gpudb.protocol">ExecuteProcResponse</a></span> <span className="element-name">executeProc</span><wbr /><span className="parameters">(<a href="/content/api/java/com/gpudb/protocol/ExecuteProcRequest" title="class in com.gpudb.protocol">ExecuteProcRequest</a> request)</span> throws <span className="exceptions"><a href="/content/api/java/com/gpudb/GPUdbException" title="class in com.gpudb">GPUdbException</a></span></div>

        <div className="block">
          Executes a proc. This endpoint is asynchronous and does not wait for the proc to complete before returning.
          <p> If the proc being executed is distributed, <a href="/content/api/java/com/gpudb/protocol/ExecuteProcRequest#getInputTableNames()"><code>inputTableNames</code></a> and <a href="/content/api/java/com/gpudb/protocol/ExecuteProcRequest#getInputColumnNames()"><code>inputColumnNames</code></a> may be passed to the proc to use for reading data, and <a href="/content/api/java/com/gpudb/protocol/ExecuteProcRequest#getOutputTableNames()"><code>outputTableNames</code></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>

        <div className="dl notes">
          <div className="dt">Parameters:</div>
          <div className="dd"><code>request</code> - <a href="/content/api/java/com/gpudb/protocol/ExecuteProcRequest" title="class in com.gpudb.protocol"><code>Request</code></a> object containing the parameters for the operation.</div>
          <div className="dt">Returns:</div>
          <div className="dd"><a href="/content/api/java/com/gpudb/protocol/ExecuteProcResponse" title="class in com.gpudb.protocol"><code>Response</code></a> object containing the results of the operation.</div>
          <div className="dt">Throws:</div>
          <div className="dd"><code><a href="/content/api/java/com/gpudb/GPUdbException" title="class in com.gpudb">GPUdbException</a></code> - if an error occurs during the operation.</div>
        </div>
      </div>
    </li>

    <li>
      <div className="section detail" id="executeProc(java.lang.String,java.util.Map,java.util.Map,java.util.List,java.util.Map,java.util.List,java.util.Map)">
        <h3>executeProc</h3>
        <div className="member-signature"><span className="modifiers">public</span> <span className="return-type"><a href="/content/api/java/com/gpudb/protocol/ExecuteProcResponse" title="class in com.gpudb.protocol">ExecuteProcResponse</a></span> <span className="element-name">executeProc</span><wbr /><span className="parameters">(<a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/String.html" title="class or interface in java.lang" className="external-link">String</a> procName, <a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/util/Map.html" title="class or interface in java.util" className="external-link">Map</a>\<<a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/String.html" title="class or interface in java.lang" className="external-link">String</a>,<wbr /><a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/String.html" title="class or interface in java.lang" className="external-link">String</a>> params, <a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/util/Map.html" title="class or interface in java.util" className="external-link">Map</a>\<<a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/String.html" title="class or interface in java.lang" className="external-link">String</a>,<wbr /><a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/nio/ByteBuffer.html" title="class or interface in java.nio" className="external-link">ByteBuffer</a>> binParams, <a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/util/List.html" title="class or interface in java.util" className="external-link">List</a>\<<a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/String.html" title="class or interface in java.lang" className="external-link">String</a>> inputTableNames, <a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/util/Map.html" title="class or interface in java.util" className="external-link">Map</a>\<<a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/String.html" title="class or interface in java.lang" className="external-link">String</a>,<wbr /><a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/util/List.html" title="class or interface in java.util" className="external-link">List</a>\<<a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/String.html" title="class or interface in java.lang" className="external-link">String</a>>> inputColumnNames, <a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/util/List.html" title="class or interface in java.util" className="external-link">List</a>\<<a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/String.html" title="class or interface in java.lang" className="external-link">String</a>> outputTableNames, <a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/util/Map.html" title="class or interface in java.util" className="external-link">Map</a>\<<a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/String.html" title="class or interface in java.lang" className="external-link">String</a>,<wbr /><a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/String.html" title="class or interface in java.lang" className="external-link">String</a>> options)</span> throws <span className="exceptions"><a href="/content/api/java/com/gpudb/GPUdbException" title="class in com.gpudb">GPUdbException</a></span></div>

        <div className="block">
          Executes a proc. This endpoint is asynchronous and does not wait for the proc to complete before returning.
          <p> If the proc being executed is distributed, <code>inputTableNames</code> and <code>inputColumnNames</code> may be passed to the proc to use for reading data, and <code>outputTableNames</code> 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>

        <div className="dl notes">
          <div className="dt">Parameters:</div>
          <div className="dd"><code>procName</code> - Name of the proc to execute. Must be the name of a currently existing proc.</div>
          <div className="dd"><code>params</code> - 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 <a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/util/Map.html" title="class or interface in java.util" className="external-link"><code>Map</code></a>.</div>
          <div className="dd"><code>binParams</code> - 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 <a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/util/Map.html" title="class or interface in java.util" className="external-link"><code>Map</code></a>.</div>
          <div className="dd"><code>inputTableNames</code> - 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 <a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/util/List.html" title="class or interface in java.util" className="external-link"><code>List</code></a>.</div>
          <div className="dd"><code>inputColumnNames</code> - Map of table names from <code>inputTableNames</code> 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 <code>inputTableNames</code> 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 <a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/util/Map.html" title="class or interface in java.util" className="external-link"><code>Map</code></a>.</div>
          <div className="dd"><code>outputTableNames</code> - 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 <code>inputTableNames</code>, 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 <a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/util/List.html" title="class or interface in java.util" className="external-link"><code>List</code></a>.</div>

          <div className="dd">
            <code>options</code> - Optional parameters.

            <ul>
              <li><a href="/content/api/java/com/gpudb/protocol/ExecuteProcRequest.Options#CACHE_INPUT"><code>CACHE\_INPUT</code></a>: No longer supported; option will be ignored. The default value is ''. </li>
              <li><a href="/content/api/java/com/gpudb/protocol/ExecuteProcRequest.Options#USE_CACHED_INPUT"><code>USE\_CACHED\_INPUT</code></a>: No longer supported; option will be ignored. The default value is ''. </li>
              <li><a href="/content/api/java/com/gpudb/protocol/ExecuteProcRequest.Options#RUN_TAG"><code>RUN\_TAG</code></a>: A string that, if not empty, can be used in subsequent calls to <a href="#showProcStatus(java.lang.String,java.util.Map)"><code>showProcStatus</code></a> or <a href="#killProc(java.lang.String,java.util.Map)"><code>killProc</code></a> to identify the proc instance. The default value is ''. </li>
              <li><a href="/content/api/java/com/gpudb/protocol/ExecuteProcRequest.Options#MAX_OUTPUT_LINES"><code>MAX\_OUTPUT\_LINES</code></a>: The maximum number of lines of output from stdout and stderr to return via <a href="#showProcStatus(java.lang.String,java.util.Map)"><code>showProcStatus</code></a>. If the number of lines output exceeds the maximum, earlier lines are discarded. The default value is '100'. </li>

              <li>
                <a href="/content/api/java/com/gpudb/protocol/ExecuteProcRequest.Options#EXECUTE_AT_STARTUP"><code>EXECUTE\_AT\_STARTUP</code></a>: If <a href="/content/api/java/com/gpudb/protocol/ExecuteProcRequest.Options#TRUE"><code>TRUE</code></a>, an instance of the proc will run when the database is started instead of running immediately. The <a href="/content/api/java/com/gpudb/protocol/ExecuteProcResponse#getRunId()"><code>runId</code></a> can be retrieved using <a href="#showProc(java.lang.String,java.util.Map)"><code>showProc</code></a> and used in <a href="#showProcStatus(java.lang.String,java.util.Map)"><code>showProcStatus</code></a>. Supported values:

                <ul>
                  <li><a href="/content/api/java/com/gpudb/protocol/ExecuteProcRequest.Options#TRUE"><code>TRUE</code></a> </li>
                  <li><a href="/content/api/java/com/gpudb/protocol/ExecuteProcRequest.Options#FALSE"><code>FALSE</code></a> </li>
                </ul>

                The default value is <a href="/content/api/java/com/gpudb/protocol/ExecuteProcRequest.Options#FALSE"><code>FALSE</code></a>.
              </li>

              <li><a href="/content/api/java/com/gpudb/protocol/ExecuteProcRequest.Options#EXECUTE_AT_STARTUP_AS"><code>EXECUTE\_AT\_STARTUP\_AS</code></a>: Sets the alternate user name to execute this proc instance as when <a href="/content/api/java/com/gpudb/protocol/ExecuteProcRequest.Options#EXECUTE_AT_STARTUP"><code>EXECUTE\_AT\_STARTUP</code></a> is <a href="/content/api/java/com/gpudb/protocol/ExecuteProcRequest.Options#TRUE"><code>TRUE</code></a>. The default value is ''. </li>
            </ul>

            The default value is an empty <a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/util/Map.html" title="class or interface in java.util" className="external-link"><code>Map</code></a>.
          </div>

          <div className="dt">Returns:</div>
          <div className="dd"><a href="/content/api/java/com/gpudb/protocol/ExecuteProcResponse" title="class in com.gpudb.protocol"><code>Response</code></a> object containing the results of the operation.</div>
          <div className="dt">Throws:</div>
          <div className="dd"><code><a href="/content/api/java/com/gpudb/GPUdbException" title="class in com.gpudb">GPUdbException</a></code> - if an error occurs during the operation.</div>
        </div>
      </div>
    </li>
  </ul>
</div>
