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

[Source](https://github.com/kineticadb/kinetica-api-rust/blob/master/crates/gpudb-api/src/generated/create_trigger_by_range.rs#L38-L55)
pub async fn [create\_trigger\_by\_range](https://docs.kinetica.com/content/api/rust/gpudb/struct.Kinetica/create-trigger-by-range.md#method.create_trigger_by_range)( \&self, request\_id: [String](https://doc.rust-lang.org/1.98.1/alloc/string/struct.String.html), table\_names: [Vec](https://doc.rust-lang.org/1.98.1/alloc/vec/struct.Vec.html)\<[String](https://doc.rust-lang.org/1.98.1/alloc/string/struct.String.html)>, column\_name: [String](https://doc.rust-lang.org/1.98.1/alloc/string/struct.String.html), min: [f64](https://doc.rust-lang.org/1.98.1/std/primitive.f64.html), max: [f64](https://doc.rust-lang.org/1.98.1/std/primitive.f64.html), ) -> [Result](https://doc.rust-lang.org/1.98.1/core/result/enum.Result.html)\<[CreateTriggerByRangeResponse](https://docs.kinetica.com/content/api/rust/generated/api/struct.CreateTriggerByRangeResponse.md), [KineticaError](https://docs.kinetica.com/content/api/rust/errors/enum.KineticaError.md)>

Create a table trigger for new records falling within a 1-D rangeSets up a simple range trigger for a column\_name for one or more tables. Once the trigger has been activated, any record added to the listed tables(s) via `/insert/records` with the chosen column\_name’s value falling within the specified range will trip the trigger. All such records will be queued at the trigger port (by default ‘9001’ but able to be retrieved via `/show/system/status`) for any listening client to collect. Active triggers can be cancelled by using the `/clear/trigger` endpoint or by clearing all relevant tables.The output returns the trigger handle as well as indicating success or failure of the trigger activation.

##### Arguments

<ul>
  <li>`request_id` - User-created ID for the trigger. The ID can be alphanumeric, contain symbols, and must contain at least one character.</li>
  <li>`table_names` - Tables on which the trigger will be active, each in \[schema\_name.]table\_name format, using standard name resolution rules.</li>
  <li>`column_name` - Name of a numeric column\_name on which the trigger is activated.</li>
  <li>`min` - The lower bound (inclusive) for the trigger range.</li>
  <li>`max` - The upper bound (inclusive) for the trigger range.</li>
</ul>

[Source](https://github.com/kineticadb/kinetica-api-rust/blob/master/crates/gpudb-api/src/generated/create_trigger_by_range.rs#L85-L109)
pub async fn [create\_trigger\_by\_range\_with\_opts](https://docs.kinetica.com/content/api/rust/gpudb/struct.Kinetica/create-trigger-by-range.md#method.create_trigger_by_range_with_opts)( \&self, request\_id: [String](https://doc.rust-lang.org/1.98.1/alloc/string/struct.String.html), table\_names: [Vec](https://doc.rust-lang.org/1.98.1/alloc/vec/struct.Vec.html)\<[String](https://doc.rust-lang.org/1.98.1/alloc/string/struct.String.html)>, column\_name: [String](https://doc.rust-lang.org/1.98.1/alloc/string/struct.String.html), min: [f64](https://doc.rust-lang.org/1.98.1/std/primitive.f64.html), max: [f64](https://doc.rust-lang.org/1.98.1/std/primitive.f64.html), options: [CreateTriggerByRangeRequestOptions](https://docs.kinetica.com/content/api/rust/generated/api/struct.CreateTriggerByRangeRequestOptions.md), ) -> [Result](https://doc.rust-lang.org/1.98.1/core/result/enum.Result.html)\<[CreateTriggerByRangeResponse](https://docs.kinetica.com/content/api/rust/generated/api/struct.CreateTriggerByRangeResponse.md), [KineticaError](https://docs.kinetica.com/content/api/rust/errors/enum.KineticaError.md)>

Create a table trigger for new records falling within a 1-D rangeSets up a simple range trigger for a column\_name for one or more tables. Once the trigger has been activated, any record added to the listed tables(s) via `/insert/records` with the chosen column\_name’s value falling within the specified range will trip the trigger. All such records will be queued at the trigger port (by default ‘9001’ but able to be retrieved via `/show/system/status`) for any listening client to collect. Active triggers can be cancelled by using the `/clear/trigger` endpoint or by clearing all relevant tables.The output returns the trigger handle as well as indicating success or failure of the trigger activation.

##### Arguments

<ul>
  <li>`request_id` - User-created ID for the trigger. The ID can be alphanumeric, contain symbols, and must contain at least one character.</li>
  <li>`table_names` - Tables on which the trigger will be active, each in \[schema\_name.]table\_name format, using standard name resolution rules.</li>
  <li>`column_name` - Name of a numeric column\_name on which the trigger is activated.</li>
  <li>`min` - The lower bound (inclusive) for the trigger range.</li>
  <li>`max` - The upper bound (inclusive) for the trigger range.</li>
  <li>`options` - The optional parameters; any left unset take the server’s defaults.</li>
</ul>

[Source](https://github.com/kineticadb/kinetica-api-rust/blob/master/crates/gpudb-api/src/generated/create_trigger_by_range.rs#L112-L123)
pub async fn [create\_trigger\_by\_range\_raw](https://docs.kinetica.com/content/api/rust/gpudb/struct.Kinetica/create-trigger-by-range.md#method.create_trigger_by_range_raw)( \&self, request: &[CreateTriggerByRangeRequest](https://docs.kinetica.com/content/api/rust/generated/api/struct.CreateTriggerByRangeRequest.md), ) -> [Result](https://doc.rust-lang.org/1.98.1/core/result/enum.Result.html)\<[CreateTriggerByRangeResponse](https://docs.kinetica.com/content/api/rust/generated/api/struct.CreateTriggerByRangeResponse.md), [KineticaError](https://docs.kinetica.com/content/api/rust/errors/enum.KineticaError.md)>

Sends a pre-built [`CreateTriggerByRangeRequest`](https://docs.kinetica.com/content/api/rust/generated/api/struct.CreateTriggerByRangeRequest) to the `/create/trigger/byrange` endpoint.

[Source](https://github.com/kineticadb/kinetica-api-rust/blob/master/crates/gpudb-api/src/generated/create_trigger_by_range.rs#L127-L139)
pub async fn [create\_trigger\_by\_range\_from\_url](https://docs.kinetica.com/content/api/rust/gpudb/struct.Kinetica/create-trigger-by-range.md#method.create_trigger_by_range_from_url)( \&self, url: &[str](https://doc.rust-lang.org/1.98.1/std/primitive.str.html), request: &[CreateTriggerByRangeRequest](https://docs.kinetica.com/content/api/rust/generated/api/struct.CreateTriggerByRangeRequest.md), ) -> [Result](https://doc.rust-lang.org/1.98.1/core/result/enum.Result.html)\<[CreateTriggerByRangeResponse](https://docs.kinetica.com/content/api/rust/generated/api/struct.CreateTriggerByRangeResponse.md), [KineticaError](https://docs.kinetica.com/content/api/rust/errors/enum.KineticaError.md)>

Sends a pre-built [`CreateTriggerByRangeRequest`](https://docs.kinetica.com/content/api/rust/generated/api/struct.CreateTriggerByRangeRequest) to a specific worker URL, bypassing HA head-node selection. Used for multi-head access.


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