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

# get_job

<div className="kinetica-pydoc">
  <div className="dl py method">
    <div className="dt sig sig-object py" id="gpudb.GPUdb.get_job"> <span className="sig-name descname"><span className="pre">get\_job</span></span><span className="sig-paren">(</span><span className="em sig-param"><span className="n"><span className="pre">job\_id</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#L30609"><span className="viewcode-link"><span className="pre">\[source]</span></span></a></div>

    <div className="dd">
      <p>Get the status and result of asynchronously running job. See the <a className="reference internal" href="#gpudb.GPUdb.create_job" title="gpudb.GPUdb.create_job"><code className="xref py py-meth docutils literal notranslate"><span className="pre">GPUdb.create\_job()</span></code></a> for starting an asynchronous job. Some fields of the response are filled only after the submitted job has finished execution.</p>
      <p><strong>Parameters</strong></p>

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

            <div className="dd">
              <p>A unique identifier for the job whose status and result is to be fetched.</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> – Job tag returned in call to create the job.</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 simple">
            <div className="dt">endpoint (<span className="em">str</span>) –</div>

            <div className="dd">
              <p>The endpoint which is being executed asynchronously. E.g. ‘/alter/table’.</p>
            </div>

            <div className="dt">job\_status (<span className="em">str</span>) –</div>

            <div className="dd">
              <p>Status of the submitted job. Allowed values are:</p>

              <ul className="simple">
                <li>
                  <p><strong>RUNNING</strong> – The job is currently executing.</p>
                </li>

                <li>
                  <p><strong>DONE</strong> – The job execution has successfully completed and the response is included in the output parameter <span className="em">job\_response</span> or output parameter <span className="em">job\_response\_str</span> field.</p>
                </li>

                <li>
                  <p><strong>ERROR</strong> – The job was attempted, but an error was encountered. The output parameter <span className="em">status\_map</span> contains the details of the error in error\_message.</p>
                </li>

                <li>
                  <p><strong>CANCELLED</strong> – Job cancellation was requested while the execution was in progress.</p>
                </li>
              </ul>
            </div>

            <div className="dt">running (<span className="em">bool</span>) –</div>

            <div className="dd">
              <p>True if the end point is still executing.</p>
            </div>

            <div className="dt">progress (<span className="em">int</span>) –</div>

            <div className="dd">
              <p>Approximate percentage of the job completed.</p>
            </div>

            <div className="dt">successful (<span className="em">bool</span>) –</div>

            <div className="dd">
              <p>True if the job execution completed and no errors were encountered.</p>
            </div>

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

            <div className="dd">
              <p>The encoding of the job result (contained in output parameter <span className="em">job\_response</span> or output parameter <span className="em">job\_response\_str</span>. Allowed values are:</p>

              <ul className="simple">
                <li>
                  <p><strong>binary</strong> – The job result is binary-encoded. It is contained in output parameter <span className="em">job\_response</span>.</p>
                </li>

                <li>
                  <p><strong>json</strong> – The job result is JSON-encoded. It is contained in output parameter <span className="em">job\_response\_str</span>.</p>
                </li>
              </ul>
            </div>

            <div className="dt">job\_response (<span className="em">bytes</span>) –</div>

            <div className="dd">
              <p>The binary-encoded response of the job. This field is populated only when the job has completed and output parameter <span className="em">response\_encoding</span> is <span className="em">binary</span>.</p>
            </div>

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

            <div className="dd">
              <p>The json-encoded response of the job. This field is populated only when the job has completed and output parameter <span className="em">response\_encoding</span> is <span className="em">json</span>.</p>
            </div>

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

            <div className="dd">
              <p>Map of various status strings for the executed job. Allowed keys are:</p>

              <ul className="simple">
                <li>
                  <p><strong>error\_message</strong> – Explains what error occurred while running the job asynchronously. This entry only exists when the job status is <span className="em">ERROR</span>.</p>
                </li>
              </ul>
            </div>

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

            <div className="dd">
              <p>Additional information.</p>
            </div>
          </div>
        </div>
      </div>
    </div>
  </div>
</div>
