-
Notifications
You must be signed in to change notification settings - Fork 45
Recipe Data
The recipe data is a JSON document that defines the actual data and configuration on which a recipe will run. It will describe all of the data being passed to the recipe’s inputs, as well as the workspace for storing the output for all of the recipe’s jobs. The recipe data is required when creating and queuing a recipe.
Example recipe data:
{
"version": "1.0",
"input_data": [
{
"name": "image",
"file_id": 1234
},
{
"name": "georeference_data",
"file_id": 1235
}
],
"workspace_id": 12
}
The input_data
value is a list detailing the data to pass to each input in the recipe. In this case the input called image
that takes a PNG image file is being passed a file from the Scale system that has the unique ID
1234, and the input called georeference_data
which takes a CSV file is being passed a Scale file with the ID
1235. The workspace_id
value indicates that any files produced by the jobs in the recipe should be stored in the workspace with the unique ID
12. Continue reading to see all of the options for the Recipe Data Specification.
A valid recipe data is a JSON document with the following structure:
{
"version": STRING,
"workspace_id": INTEGER,
"input_data": [
{
"name": STRING,
"value": STRING
},
{
"name": STRING,
"file_id": INTEGER
},
{
"name": STRING,
"file_ids": [
INTEGER,
INTEGER
]
}
]
}
Type: String
Required: No
Defines the version of the data specification used. This allows updates to be made to the specification while maintaining backwards compatibility by allowing Scale to recognize an olderversion
and convert it to the current version. The default value, if not included, is the latestversion
(currently1.0
).
Type: Integer
Required: Yes
Required if any of the jobs in the recipe produce any output files. Theworkspace_id
value is an integer providing the unique ID of the workspace to use for storing any files produced by the recipe’s jobs.
Type: Array
Required: No
Defines the actual data the recipe receives for its inputs. If not provided, input_data defaults to[]
. For the recipe data to be valid, every required input in the matching recipe definition must have a corresponding entry in this input_data field. The JSON object that represents each input data has the following fields:
-
Type: String
Required: Yes
Gives the name of the input that the data is being provided for. It should match the name of an input in the recipe’s definition. The name of every input in the recipe data must be unique.
The other fields that describe the data being passed to the input are based upon the type of the input as it is defined in the recipe definition. The valid types from the recipe definition specification are:
-
A
file
input has the following additional field:Type: Integer
Required: Yes
Unique ID of a file in the Scale system that will be passed to the input. The file must meet all of the criteria defined in the recipe definition for the input. -
A
files
input has the following additional field:Type: Array
Required: Yes
List of unique IDs of the files in the Scale system that will be passed to the input. Each file must meet all of the criteria defined in the recipe definition for the input. Afiles
input will accept a file_id field instead of a file_ids field (the input will be passed a list containing the single file). -
A
property
input has the following additional field:Type: String
Required: Yes
String value that will be passed to the “property” input.
- Home
- What's New
-
In-depth Topics
- Enable Scale to run CUDA GPU optimized algorithms
- Enable Scale to store secrets securely
- Test Scale's scan capability on the fly
- Test Scale's workspace broker capability on the fly
- Scale Performance Metrics
- Private docker repository configuration
- Setting up Automated Snapshots for Elasticsearch
- Setting up Cluster Monitoring
- Developer Notes