Get All Datasets Node
Overview
The Get All Datasets Node is used to retrieve all datasets available in the current project. This node is particularly useful when you want to access and manipulate multiple datasets in your graph, or search through all datasets for a specific dataset.
The node requires a dataset provider to be available in the context when the graph is being run. The dataset provider is responsible for managing the storage and retrieval of datasets. In the Rivet application, the dataset provider is handled for you automatically.
For more information on datasets, see the Data Studio section of the user guide.
- Inputs
- Outputs
- Editor Settings
The Get All Datasets Node does not have any inputs.
Outputs
Title | Data Type | Description | Notes |
---|---|---|---|
Datasets | object[] | An array of all datasets in the current project. Each dataset is represented as an object. | If no datasets exist in the current project, the output will be an empty array. |
Object Structure
Each dataset in the Datasets
output is represented as an object with the following properties:
Title | Data Type | Description | Notes |
---|---|---|---|
id | string | The ID of the dataset. | |
name | string | The name of the dataset. | |
description | string | The description of the dataset. |
Note that the actual data of the dataset is not included in the output. To retrieve the data of a dataset, use the Load Dataset Node.
The Get All Datasets Node does not have any configurable editor settings.
Example: Retrieve all datasets in a project
- In the Data Studio, create a few datasets with different IDs.
- Create a Get All Datasets Node in your graph.
- Run the graph. The
Datasets
output of the Get All Datasets Node should contain an array of all datasets in the current project.
Error Handling
The Get All Datasets Node will error if the dataset provider is not available in the context when the graph is being run.
FAQ
Q: What is a dataset provider?
A: A dataset provider is an object that is responsible for managing the storage and retrieval of datasets. It is passed to the context when the graph is being run. The dataset provider must implement the DatasetProvider
interface, which includes methods for getting, putting, and deleting datasets. See the API Reference for more information.
Q: Can I filter the datasets returned by the Get All Datasets Node?
A: No, the Get All Datasets Node will return all datasets in the current project. If you want to filter the datasets, you can use other nodes to process the output of the Get All Datasets Node, such as the Filter Node or Extract Object Path Node
Q: What happens if there are no datasets in the current project?
A: If there are no datasets in the current project, the Datasets
output of the Get All Datasets Node will be an empty array.