Dataset
A Dataset is a linked set of IPFS DAG entries that are used to store results of tasks, input, or task status.
There are two ways to reference a dataset in a task.
Explicit IPFS reference
Linking directly to the IPFS CID of a dataset will ensure computes uses the correct dataset. This reference is immutable and cannot change over time.
{
"dataset": {
"/": "zdpuB1cyssBgbsexpu2LcvCHe2k6FTTqwQAXCj7LsaGErPqvK"
}
}
You may use the computes-cli to generate a new dataset from a unique value
computes-cli dataset create --generate-uuid
> zdpuB1cyssBgbsexpu2LcvCHe2k6FTTqwQAXCj7LsaGErPqvK
Initial Seed Value
Sometimes using the explicit IPFS reference is inconvenient. In this case, you may use a seed value which will be used to calculate the IPFS reference.
{
"dataset": {
"init": "some-value"
}
}
The results should be the same as running the computes-cli command
computes-cli dataset create "some-value"
> zdpuArwKMPCexEap3fWXGS3DE2zmF5iRNG6vXaYhNAuCq6ecm
Updated over 6 years ago