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

# createJob

<div className="kinetica-javadoc">
  <ul className="member-list">
    <li>
      <div className="section detail" id="createJob(com.gpudb.protocol.CreateJobRequest)">
        <h3>createJob</h3>
        <div className="member-signature"><span className="modifiers">public</span> <span className="return-type"><a href="/content/api/java/com/gpudb/protocol/CreateJobResponse" title="class in com.gpudb.protocol">CreateJobResponse</a></span> <span className="element-name">createJob</span><wbr /><span className="parameters">(<a href="/content/api/java/com/gpudb/protocol/CreateJobRequest" title="class in com.gpudb.protocol">CreateJobRequest</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">Create a job which will run asynchronously. The response returns a job ID, which can be used to query the status and result of the job. The status and the result of the job upon completion can be requested by <a href="#getJob(com.gpudb.protocol.GetJobRequest)"><code>getJob</code></a>.</div>

        <div className="dl notes">
          <div className="dt">Parameters:</div>
          <div className="dd"><code>request</code> - <a href="/content/api/java/com/gpudb/protocol/CreateJobRequest" 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/CreateJobResponse" 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="createJob(java.lang.String,java.lang.String,java.nio.ByteBuffer,java.lang.String,java.util.Map)">
        <h3>createJob</h3>
        <div className="member-signature"><span className="modifiers">public</span> <span className="return-type"><a href="/content/api/java/com/gpudb/protocol/CreateJobResponse" title="class in com.gpudb.protocol">CreateJobResponse</a></span> <span className="element-name">createJob</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> endpoint, <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> requestEncoding, <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> data, <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> dataStr, <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">Create a job which will run asynchronously. The response returns a job ID, which can be used to query the status and result of the job. The status and the result of the job upon completion can be requested by <a href="#getJob(long,java.util.Map)"><code>getJob</code></a>.</div>

        <div className="dl notes">
          <div className="dt">Parameters:</div>
          <div className="dd"><code>endpoint</code> - Indicates which endpoint to execute, e.g. '/alter/table'.</div>

          <div className="dd">
            <code>requestEncoding</code> - The encoding of the request payload for the job. Supported values:

            <ul>
              <li><a href="/content/api/java/com/gpudb/protocol/CreateJobRequest.RequestEncoding#BINARY"><code>BINARY</code></a> </li>
              <li><a href="/content/api/java/com/gpudb/protocol/CreateJobRequest.RequestEncoding#JSON"><code>JSON</code></a> </li>
              <li><a href="/content/api/java/com/gpudb/protocol/CreateJobRequest.RequestEncoding#SNAPPY"><code>SNAPPY</code></a> </li>
            </ul>

            The default value is <a href="/content/api/java/com/gpudb/protocol/CreateJobRequest.RequestEncoding#BINARY"><code>BINARY</code></a>.
          </div>

          <div className="dd"><code>data</code> - Binary-encoded payload for the job to be run asynchronously. The payload must contain the relevant input parameters for the endpoint indicated in <code> endpoint</code>. Please see the documentation for the appropriate endpoint to see what values must (or can) be specified. If this parameter is used, then <code> requestEncoding</code> must be <a href="/content/api/java/com/gpudb/protocol/CreateJobRequest.RequestEncoding#BINARY"><code>BINARY</code></a> or <a href="/content/api/java/com/gpudb/protocol/CreateJobRequest.RequestEncoding#SNAPPY"><code>SNAPPY</code></a>.</div>
          <div className="dd"><code>dataStr</code> - JSON-encoded payload for the job to be run asynchronously. The payload must contain the relevant input parameters for the endpoint indicated in <code> endpoint</code>. Please see the documentation for the appropriate endpoint to see what values must (or can) be specified. If this parameter is used, then <code> requestEncoding</code> must be <a href="/content/api/java/com/gpudb/protocol/CreateJobRequest.RequestEncoding#JSON"><code>JSON</code></a>.</div>

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

            <ul>
              <li><a href="/content/api/java/com/gpudb/protocol/CreateJobRequest.Options#JOB_TAG"><code>JOB\_TAG</code></a>: Tag to use for submitted job. The same tag could be used on backup cluster to retrieve response for the job. Tags can use letter, numbers, '\_' and '-'. </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/CreateJobResponse" 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>
