Properties Declaration
The Properties declaration describes a Node's data points, the input and output of a Node. When a Node receives input from another Node it comes across one of these properties. When a Node produces output of any type, it sends that output by way of one of these properties.
Properties consist of a property key
and zero or more optional configuration details.
properties.yaml
value:
description: Provide a number, and get back the double value in ((double)).
datatype: number
default: 1
order: 20
double:
description: The doubled value.
order: 10
readonly: true
Property Keys
Each Property needs to have a unique key. This is the key that will be used for referencing this Property and performing value lookups against it.
Requirements for a key are as follows:
- Keys are case sensitive.
- A key must start with alpha character of the form
[A-Z]
or[a-z]
. - A key may have an alpha character of the form
[A-Z]
or[a-z]
. - A key may have a numeric character of the form
[0-9]
, but it may not be the first character. - A key may have an underscore character, but it may not be the first character.
Warning
Once a Node is published and in-use by others, changing the key in future versions may affect existing connections.
Property Fields
datatype
: The type of data this field holds. Possible values are described in the datatype property documentation.default
: The default value of the property field.description
: A short, human readable description of the property field.direction
: The directionality of the property field. Possible values are described in the direction property documenation.documentation
: Longer form documentation for the property field, if needed.
group
: A logical grouping for propeties. A property that is given a group will be visually grouped together with properties of the same group when visually displayed. If no group is given, the properties are not grouped. More details can be found in the group property documenation.hidden
: Iftrue
this property is hidden and not shown when the Node is displayed visually.name
: The name or label of this property. Has a maximum of 256 characters. If a name is not provided, Openexus will use thekey
and attempt to format it nicely. This may not always be quite correct, so feel free to use the name field to override that behavior.order
: The importance of the property; a higher number indicates more importance. More details can be found in the order property documenation.
required
: Iftrue
this property is required to have a value.
value
: The value of the property field. This differs from the default in that the default is used ONLY IF the value is not set.
Examples
Some examples of Property Declarations.
properties.yaml
view:
datatype: web-view
data:
description: Incoming data to display on a table. Commonly connected to the [result] property of api nodes so that we can show data. Array of objects are required to show in a table. If an object instead of an array is provided instead, this node can best guess the array to display in the table. If the guess is incorrect, [data_query] property can be used to transform the data to an array.
datatype: json
order: 10
data_query:
description: "Transform the data using JMESPath (https://jmespath.org). You can use common dot notion to transverse the data object. For example, given an object { list: [1,2,3] }, setting [data_query] as '.list' will return just the array [1,2,3]. If the intention is to selective only show some columns, use the [columns] property, do not need to use the [data_query] property."
datatype: json
order: 10
table_columns:
name: Columns
description: Define the columns to show in the table. Update this property if we want to selectively only show some columns from the given data. If not provided, all columns would be shown. Update this property with a comma seperated string. For example, "id,name,rating" will only show the id, name, and rating keys from the given object.
datatype: text
order: 10
selected_row:
description: Get the data for the selected row. This can be useful to connect the selected data to show additional details.
datatype: any
selected_row_index:
description: Selected row index.
datatype: number
properties.yaml
result:
description: Result of the NASA Earth Imagery which returns a satelite image of a specified point and dimension on earth.
order: 10
datatype: image
api_key:
datatype: text
default: niceTry
hidden: true
lat:
description: Latitude of the satelite image to get
datatype: text
required: true
lon:
description: Longitude of the satelite image to get
datatype: text
required: true
dim:
description: Dimension of the image in degrees
datatype: text
default: 0.025
date:
description: Date to fetch in YYYY-MM-DD
datatype: text
required: true
default: "2024-05-01"