Skip to main content
Source

pub async fn filter_by_range( &self, table_name: String, view_name: String, column_name: String, lower_bound: f64, upper_bound: f64, ) -> Result<FilterByRangeResponse, KineticaError>

Filter a dataset for records within a 1-D range

Calculates which objects from a table have a column that is within the given bounds. An object from the table identified by table_name is added to the view view_name if its column is within [lower_bound, upper_bound] (inclusive). The operation is synchronous. The response provides a count of the number of objects which passed the bound filter. Although this functionality can also be accomplished with the standard filter function, it is more efficient.

For track objects, the count reflects how many points fall within the given bounds (which may not include all the track points of any given track).

  • table_name - Name of the table on which the filter by range operation will be performed, in [schema_name.]table_name format, using standard name resolution rules. Must be an existing table.
  • view_name - If provided, then this will be the name of the view containing the results, in [schema_name.]view_name format, using standard name resolution rules and meeting table naming criteria. Must not be an already existing table or view.
  • column_name - Name of a column on which the operation would be applied.
  • lower_bound - Value of the lower bound (inclusive).
  • upper_bound - Value of the upper bound (inclusive).
Source

pub async fn filter_by_range_with_opts( &self, table_name: String, view_name: String, column_name: String, lower_bound: f64, upper_bound: f64, options: FilterByRangeRequestOptions, ) -> Result<FilterByRangeResponse, KineticaError>

Filter a dataset for records within a 1-D range

Calculates which objects from a table have a column that is within the given bounds. An object from the table identified by table_name is added to the view view_name if its column is within [lower_bound, upper_bound] (inclusive). The operation is synchronous. The response provides a count of the number of objects which passed the bound filter. Although this functionality can also be accomplished with the standard filter function, it is more efficient.

For track objects, the count reflects how many points fall within the given bounds (which may not include all the track points of any given track).

  • table_name - Name of the table on which the filter by range operation will be performed, in [schema_name.]table_name format, using standard name resolution rules. Must be an existing table.
  • view_name - If provided, then this will be the name of the view containing the results, in [schema_name.]view_name format, using standard name resolution rules and meeting table naming criteria. Must not be an already existing table or view.
  • column_name - Name of a column on which the operation would be applied.
  • lower_bound - Value of the lower bound (inclusive).
  • upper_bound - Value of the upper bound (inclusive).
  • options - The optional parameters; any left unset take the server’s defaults.

Sends a pre-built FilterByRangeRequest to the /filter/byrange endpoint.

Sends a pre-built FilterByRangeRequest to a specific worker URL, bypassing HA head-node selection. Used for multi-head access.