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

<div className="kinetica-pydoc">
  <div className="dl py method">
    <div className="dt sig sig-object py" id="gpudb.GPUdb.create_trigger_by_area"> <span className="sig-name descname"><span className="pre">create\_trigger\_by\_area</span></span><span className="sig-paren">(</span><span className="em sig-param"><span className="n"><span className="pre">request\_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">table\_names</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">x\_column\_name</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">x\_vector</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">y\_column\_name</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">y\_vector</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#L25388"><span className="viewcode-link"><span className="pre">\[source]</span></span></a></div>

    <div className="dd">
      <p>Sets up an area trigger mechanism for two column\_names for one or more tables. (This function is essentially the two-dimensional version of <a className="reference internal" href="#gpudb.GPUdb.create_trigger_by_range" title="gpudb.GPUdb.create_trigger_by_range"><code className="xref py py-meth docutils literal notranslate"><span className="pre">GPUdb.create\_trigger\_by\_range()</span></code></a>.) Once the trigger has been activated, any record added to the listed tables(s) via <a className="reference internal" href="#gpudb.GPUdb.insert_records" title="gpudb.GPUdb.insert_records"><code className="xref py py-meth docutils literal notranslate"><span className="pre">GPUdb.insert\_records()</span></code></a> with the chosen columns’ values falling within the specified region will trip the trigger. All such records will be queued at the trigger port (by default ‘9001’ but able to be retrieved via <a className="reference internal" href="#gpudb.GPUdb.show_system_status" title="gpudb.GPUdb.show_system_status"><code className="xref py py-meth docutils literal notranslate"><span className="pre">GPUdb.show\_system\_status()</span></code></a>) for any listening client to collect. Active triggers can be cancelled by using the <a className="reference internal" href="#gpudb.GPUdb.clear_trigger" title="gpudb.GPUdb.clear_trigger"><code className="xref py py-meth docutils literal notranslate"><span className="pre">GPUdb.clear\_trigger()</span></code></a> endpoint or by clearing all relevant tables.</p>
      <p>The output returns the trigger handle as well as indicating success or failure of the trigger activation.</p>
      <p><strong>Parameters</strong></p>

      <div className="blockquote">
        <div>
          <div className="dl simple">
            <div className="dt">request\_id (<span className="em">str</span>) –</div>

            <div className="dd">
              <p>User-created ID for the trigger. The ID can be alphanumeric, contain symbols, and must contain at least one character.</p>
            </div>

            <div className="dt">table\_names (<span className="em">list of str</span>) –</div>

            <div className="dd">
              <p>Names of the tables on which the trigger will be activated and maintained, each in \[schema\_name.]table\_name format, using standard <a className="reference external" href="/content/concepts/tables/#table-name-resolution">name resolution rules</a>. The user can provide a single element (which will be automatically promoted to a list internally) or a list.</p>
            </div>

            <div className="dt">x\_column\_name (<span className="em">str</span>) –</div>

            <div className="dd">
              <p>Name of a numeric column on which the trigger is activated. Usually ‘x’ for geospatial data points.</p>
            </div>

            <div className="dt">x\_vector (<span className="em">list of floats</span>) –</div>

            <div className="dd">
              <p>The respective coordinate values for the region on which the trigger is activated. This usually translates to the x-coordinates of a geospatial region. The user can provide a single element (which will be automatically promoted to a list internally) or a list.</p>
            </div>

            <div className="dt">y\_column\_name (<span className="em">str</span>) –</div>

            <div className="dd">
              <p>Name of a second numeric column on which the trigger is activated. Usually ‘y’ for geospatial data points.</p>
            </div>

            <div className="dt">y\_vector (<span className="em">list of floats</span>) –</div>

            <div className="dd">
              <p>The respective coordinate values for the region on which the trigger is activated. This usually translates to the y-coordinates of a geospatial region. Must be the same length as xvals. The user can provide a single element (which will be automatically promoted to a list internally) or a list.</p>
            </div>

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

            <div className="dd">
              <p>Optional parameters. 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">trigger\_id (<span className="em">str</span>) –</div>

            <div className="dd">
              <p>Value of input parameter <span className="em">request\_id</span>.</p>
            </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>
