> ## 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-typedoc">
  <div className="section tsd-panel tsd-member">
    <h3 className="tsd-anchor-link" id="create_trigger_by_area"><span>create\_trigger\_by\_area</span></h3>

    <ul className="tsd-signatures">
      <li className="">
        <div className="tsd-signature tsd-anchor-link" id="create_trigger_by_area-1"><span className="tsd-kind-call-signature">create\_trigger\_by\_area</span><span className="tsd-signature-symbol">(</span><br /> <span className="tsd-kind-parameter">request\_id</span><span className="tsd-signature-symbol">:</span> <span className="tsd-signature-type">string</span><span className="tsd-signature-symbol">,</span><br /> <span className="tsd-kind-parameter">table\_names</span><span className="tsd-signature-symbol">:</span> <span className="tsd-signature-type">string</span><span className="tsd-signature-symbol">\[]</span><span className="tsd-signature-symbol">,</span><br /> <span className="tsd-kind-parameter">x\_column\_name</span><span className="tsd-signature-symbol">:</span> <span className="tsd-signature-type">string</span><span className="tsd-signature-symbol">,</span><br /> <span className="tsd-kind-parameter">x\_vector</span><span className="tsd-signature-symbol">:</span> <span className="tsd-signature-type">number</span><span className="tsd-signature-symbol">\[]</span><span className="tsd-signature-symbol">,</span><br /> <span className="tsd-kind-parameter">y\_column\_name</span><span className="tsd-signature-symbol">:</span> <span className="tsd-signature-type">string</span><span className="tsd-signature-symbol">,</span><br /> <span className="tsd-kind-parameter">y\_vector</span><span className="tsd-signature-symbol">:</span> <span className="tsd-signature-type">number</span><span className="tsd-signature-symbol">\[]</span><span className="tsd-signature-symbol">,</span><br /> <span className="tsd-kind-parameter">options</span><span className="tsd-signature-symbol">?:</span> <span className="tsd-signature-type">Record</span><span className="tsd-signature-symbol">\<</span><span className="tsd-signature-type">string</span><span className="tsd-signature-symbol">,</span> <span className="tsd-signature-type">string</span><span className="tsd-signature-symbol">></span><span className="tsd-signature-symbol">,</span><br /> <span className="tsd-kind-parameter">callback</span><span className="tsd-signature-symbol">?:</span> <a href="/content/api/nodejs/types/GPUdbCallback" className="tsd-signature-type tsd-kind-type-alias">GPUdbCallback</a><span className="tsd-signature-symbol">,</span><br /><span className="tsd-signature-symbol">)</span><span className="tsd-signature-symbol">:</span> <span className="tsd-signature-type">Promise</span><span className="tsd-signature-symbol">\<</span><a href="/content/api/nodejs/interfaces/CreateTriggerByAreaResponse" className="tsd-signature-type tsd-kind-interface">CreateTriggerByAreaResponse</a><span className="tsd-signature-symbol">></span></div>

        <div className="tsd-description">
          <div className="tsd-comment tsd-typography">
            <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 <code>create\_trigger\_by\_range</code>.) Once the trigger has been activated, any record added to the listed tables(s) via <code>insert\_records</code> 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 <code>show\_system\_status</code>) for any listening client to collect. Active triggers can be cancelled by using the <code>clear\_trigger</code> 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>
          </div>

          <div className="tsd-parameters">
            <h4 className="tsd-parameters-title">Parameters</h4>

            <ul className="tsd-parameter-list">
              <li>
                <span><span className="tsd-kind-parameter">request\_id</span>: <span className="tsd-signature-type">string</span></span>

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

              <li>
                <span><span className="tsd-kind-parameter">table\_names</span>: <span className="tsd-signature-type">string</span><span className="tsd-signature-symbol">\[]</span></span>

                <div className="tsd-comment tsd-typography">
                  <p>Names of the tables on which the trigger will be activated and maintained, each in \[schema\_name.]table\_name format, using standard name resolution rules.</p>
                </div>
              </li>

              <li>
                <span><span className="tsd-kind-parameter">x\_column\_name</span>: <span className="tsd-signature-type">string</span></span>

                <div className="tsd-comment tsd-typography">
                  <p>Name of a numeric column on which the trigger is activated. Usually 'x' for geospatial data points.</p>
                </div>
              </li>

              <li>
                <span><span className="tsd-kind-parameter">x\_vector</span>: <span className="tsd-signature-type">number</span><span className="tsd-signature-symbol">\[]</span></span>

                <div className="tsd-comment tsd-typography">
                  <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.</p>
                </div>
              </li>

              <li>
                <span><span className="tsd-kind-parameter">y\_column\_name</span>: <span className="tsd-signature-type">string</span></span>

                <div className="tsd-comment tsd-typography">
                  <p>Name of a second numeric column on which the trigger is activated. Usually 'y' for geospatial data points.</p>
                </div>
              </li>

              <li>
                <span><span className="tsd-kind-parameter">y\_vector</span>: <span className="tsd-signature-type">number</span><span className="tsd-signature-symbol">\[]</span></span>

                <div className="tsd-comment tsd-typography">
                  <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.</p>
                </div>
              </li>

              <li>
                <span><code className="tsd-tag">Optional</code><span className="tsd-kind-parameter">options</span>: <span className="tsd-signature-type">Record</span><span className="tsd-signature-symbol">\<</span><span className="tsd-signature-type">string</span><span className="tsd-signature-symbol">,</span> <span className="tsd-signature-type">string</span><span className="tsd-signature-symbol">></span></span>

                <div className="tsd-comment tsd-typography">
                  <p>Optional parameters.</p>
                </div>
              </li>

              <li>
                <span><code className="tsd-tag">Optional</code><span className="tsd-kind-parameter">callback</span>: <a href="/content/api/nodejs/types/GPUdbCallback" className="tsd-signature-type tsd-kind-type-alias">GPUdbCallback</a></span>

                <div className="tsd-comment tsd-typography">
                  <p>Optional callback function</p>
                </div>
              </li>
            </ul>
          </div>

          <h4 className="tsd-returns-title">Returns <span className="tsd-signature-type">Promise</span><span className="tsd-signature-symbol">\<</span><a href="/content/api/nodejs/interfaces/CreateTriggerByAreaResponse" className="tsd-signature-type tsd-kind-interface">CreateTriggerByAreaResponse</a><span className="tsd-signature-symbol">></span></h4>
          <p>Promise\<Types.CreateTriggerByAreaResponse> - Promise resolving to the response</p>

          <div className="aside tsd-sources">
            <ul>
              <li>Defined in <a href="https://github.com/kineticadb/kinetica-api-typescript/blob/master/src/GPUdb.ts#L6924">src/GPUdb.ts:6924</a></li>
            </ul>
          </div>
        </div>
      </li>
    </ul>
  </div>

  <div className="section tsd-panel tsd-member">
    <h3 className="tsd-anchor-link" id="create_trigger_by_area_request"><span>create\_trigger\_by\_area\_request</span></h3>

    <ul className="tsd-signatures">
      <li className="">
        <div className="tsd-signature tsd-anchor-link" id="create_trigger_by_area_request-1"><span className="tsd-kind-call-signature">create\_trigger\_by\_area\_request</span><span className="tsd-signature-symbol">(</span><br /> <span className="tsd-kind-parameter">request</span><span className="tsd-signature-symbol">:</span> <a href="/content/api/nodejs/interfaces/CreateTriggerByAreaRequest" className="tsd-signature-type tsd-kind-interface">CreateTriggerByAreaRequest</a><span className="tsd-signature-symbol">,</span><br /> <span className="tsd-kind-parameter">callback</span><span className="tsd-signature-symbol">?:</span> <a href="/content/api/nodejs/types/GPUdbCallback" className="tsd-signature-type tsd-kind-type-alias">GPUdbCallback</a><span className="tsd-signature-symbol">,</span><br /><span className="tsd-signature-symbol">)</span><span className="tsd-signature-symbol">:</span> <span className="tsd-signature-type">Promise</span><span className="tsd-signature-symbol">\<</span><a href="/content/api/nodejs/interfaces/CreateTriggerByAreaResponse" className="tsd-signature-type tsd-kind-interface">CreateTriggerByAreaResponse</a><span className="tsd-signature-symbol">></span></div>

        <div className="tsd-description">
          <div className="tsd-comment tsd-typography">
            <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 <code>create\_trigger\_by\_range</code>.) Once the trigger has been activated, any record added to the listed tables(s) via <code>insert\_records</code> 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 <code>show\_system\_status</code>) for any listening client to collect. Active triggers can be cancelled by using the <code>clear\_trigger</code> 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>
          </div>

          <div className="tsd-parameters">
            <h4 className="tsd-parameters-title">Parameters</h4>

            <ul className="tsd-parameter-list">
              <li>
                <span><span className="tsd-kind-parameter">request</span>: <a href="/content/api/nodejs/interfaces/CreateTriggerByAreaRequest" className="tsd-signature-type tsd-kind-interface">CreateTriggerByAreaRequest</a></span>

                <div className="tsd-comment tsd-typography">
                  <p>Request object containing the parameters for the operation</p>
                </div>
              </li>

              <li>
                <span><code className="tsd-tag">Optional</code><span className="tsd-kind-parameter">callback</span>: <a href="/content/api/nodejs/types/GPUdbCallback" className="tsd-signature-type tsd-kind-type-alias">GPUdbCallback</a></span>

                <div className="tsd-comment tsd-typography">
                  <p>Optional callback function</p>
                </div>
              </li>
            </ul>
          </div>

          <h4 className="tsd-returns-title">Returns <span className="tsd-signature-type">Promise</span><span className="tsd-signature-symbol">\<</span><a href="/content/api/nodejs/interfaces/CreateTriggerByAreaResponse" className="tsd-signature-type tsd-kind-interface">CreateTriggerByAreaResponse</a><span className="tsd-signature-symbol">></span></h4>
          <p>Promise\<Types.CreateTriggerByAreaResponse> - Promise resolving to the response</p>

          <div className="aside tsd-sources">
            <ul>
              <li>Defined in <a href="https://github.com/kineticadb/kinetica-api-typescript/blob/master/src/GPUdb.ts#L6880">src/GPUdb.ts:6880</a></li>
            </ul>
          </div>
        </div>
      </li>
    </ul>
  </div>
</div>


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.