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

# create_job

<div className="kinetica-pydoc">
  <div className="dl py method">
    <div className="dt sig sig-object py" id="gpudb.GPUdb.create_job"> <span className="sig-name descname"><span className="pre">create\_job</span></span><span className="sig-paren">(</span><span className="em sig-param"><span className="n"><span className="pre">endpoint</span></span><span className="o"><span className="pre">=</span></span><span className="default_value"><span className="pre">None</span></span></span>, <span className="em sig-param"><span className="n"><span className="pre">request\_encoding</span></span><span className="o"><span className="pre">=</span></span><span className="default_value"><span className="pre">'binary'</span></span></span>, <span className="em sig-param"><span className="n"><span className="pre">data</span></span><span className="o"><span className="pre">=</span></span><span className="default_value"><span className="pre">None</span></span></span>, <span className="em sig-param"><span className="n"><span className="pre">data\_str</span></span><span className="o"><span className="pre">=</span></span><span className="default_value"><span className="pre">None</span></span></span>, <span className="em sig-param"><span className="n"><span className="pre">options</span></span><span className="o"><span className="pre">=</span></span><span className="default_value"><span className="pre">{"{"}{"}"}</span></span></span><span className="sig-paren">)</span><a href="https://github.com/kineticadb/kinetica-api-python/blob/master/gpudb/gpudb.py#L22822"><span className="viewcode-link"><span className="pre">\[source]</span></span></a></div>

    <div className="dd">
      <p>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 className="reference internal" href="#gpudb.GPUdb.get_job" title="gpudb.GPUdb.get_job"><code className="xref py py-meth docutils literal notranslate"><span className="pre">GPUdb.get\_job()</span></code></a>.</p>
      <p><strong>Parameters</strong></p>

      <div className="blockquote">
        <div>
          <div className="dl">
            <div className="dt">endpoint (<span className="em">str</span>) –</div>

            <div className="dd">
              <p>Indicates which endpoint to execute, e.g. ‘/alter/table’.</p>
            </div>

            <div className="dt">request\_encoding (<span className="em">str</span>) –</div>

            <div className="dd">
              <p>The encoding of the request payload for the job. Allowed values are:</p>

              <ul className="simple">
                <li>
                  <p>binary</p>
                </li>

                <li>
                  <p>json</p>
                </li>

                <li>
                  <p>snappy</p>
                </li>
              </ul>

              <p>The default value is ‘binary’.</p>
            </div>

            <div className="dt">data (<span className="em">bytes</span>) –</div>

            <div className="dd">
              <p>Binary-encoded payload for the job to be run asynchronously. The payload must contain the relevant input parameters for the endpoint indicated in input parameter <span className="em">endpoint</span>. Please see the documentation for the appropriate endpoint to see what values must (or can) be specified. If this parameter is used, then input parameter <span className="em">request\_encoding</span> must be <span className="em">binary</span> or <span className="em">snappy</span>.</p>
            </div>

            <div className="dt">data\_str (<span className="em">str</span>) –</div>

            <div className="dd">
              <p>JSON-encoded payload for the job to be run asynchronously. The payload must contain the relevant input parameters for the endpoint indicated in input parameter <span className="em">endpoint</span>. Please see the documentation for the appropriate endpoint to see what values must (or can) be specified. If this parameter is used, then input parameter <span className="em">request\_encoding</span> must be <span className="em">json</span>.</p>
            </div>

            <div className="dt">options (<span className="em">dict of str to str</span>) –</div>

            <div className="dd">
              <p>Optional parameters. Allowed keys are:</p>

              <ul className="simple">
                <li>
                  <p><strong>job\_tag</strong> – 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 ‘-‘.</p>
                </li>
              </ul>

              <p>The default value is an empty dict ( {"{"}{"}"} ).</p>
            </div>
          </div>
        </div>
      </div>

      <p><strong>Returns</strong></p>

      <div className="blockquote">
        <div>
          <p>A dict with the following entries–</p>

          <div className="dl">
            <div className="dt">job\_id (<span className="em">long</span>) –</div>

            <div className="dd">
              <p>An identifier for the job created by this call.</p>
            </div>

            <div className="dt">info (<span className="em">dict of str to str</span>) –</div>

            <div className="dd">
              <p>Additional information. Allowed keys are:</p>

              <ul className="simple">
                <li>
                  <p><strong>job\_tag</strong> – The job tag specified by the user or if unspecified by user, a unique identifier generated internally.</p>
                </li>

                <li>
                  <p><strong>query\_id</strong> – A unique identifier for this job generated for use in tracing telemetry data.</p>
                </li>
              </ul>

              <p>The default value is an empty dict ( {"{"}{"}"} ).</p>
            </div>
          </div>
        </div>
      </div>
    </div>
  </div>
</div>
