Variable Constraints restrict the input side of a variable. They prevent end users from breaking queries and scripts with invalid values. A bulk of the configuration for Node Variables is contained in the associated Variable Constraints, and while Node Variables are bound to a specific node in the pipeline, Variable Constraints are global. This means that much of the configuration used for variables can be reused.
Variable constraints are an important part of interacting with the underlying queries and scripts, but you do not have to spend time restricting values in all cases. edgeCore ships with several stock constraints that you can use right out of the box. These stock constraints are unbounded in terms of the values that can be entered. They only limit input based on specific data types and characters. The stock variable constraints are a good option if you are prototyping and only need some basic constraints to get started with. The stock options include the following:
This limits values to alphanumeric characters (letters and numbers).
This limits values to a numeric characters. Unbounded means there is no MIN and MAX value, so the user can enter whatever number they want.
This is an array of STRING values that represent different time intervals. These intervals are all relative to the current time, which means that they assume the current time and then determine how far back to go. The values range from “Last 5 Minutes” to “Last 5 years”. This constraint provides a good baseline for working with time series data.