Skip to content

List Dataset Node ​

Overview ​

The List Dataset node sends the list of datasets of the Rosepetal project behind a firebase-config node: name, id and image count per tag. It sends it by itself when the connection comes up and every time a dataset changes, and on demand when it receives a message. Use it to fill a dataset selector on a dashboard, or to check that a dataset exists before uploading to it.

Key Features ​

  • Sent automatically when the connection is established and whenever the datasets change in Firebase
  • On demand: any input message sends the current list
  • Tag statistics: number of images per tag, and a total
  • Selector options: a ready-made options array of label / value pairs
  • Sorted by name, case-insensitively

Configuration ​

PropertyDefaultMeaning
Output fieldpayloadmsg property that receives the dataset array
Firebase confignone (required)The firebase-config node of the project

Input ​

Any message sends the current list with reason: "manual". The content of the message is not used and not passed on: the node sends a new message. If the connection is not up, the node warns Firebase connection not ready, sets the status waiting for firebase and sends nothing.

Output ​

javascript
{
  payload: [
    {
      name: "Bottle caps",
      id: "rp-class-bottle_caps",
      tags: { "0": 12, "OK": 1523, "SCRATCH": 387 },
      classes: ["0", "OK", "SCRATCH"],
      imageCount: 1922
    }
  ],
  reason: "refresh",
  datasetsCount: 1,
  timestamp: "2026-11-22T10:30:00.000Z",
  options: [
    { label: "Bottle caps", value: "rp-class-bottle_caps" }
  ]
}
PropertyMeaning
payload (or the Output field)One entry per dataset, sorted by name
payload[].nameName of the dataset, with its first letter in upper case
payload[].idId of the dataset, the value other nodes ask for (for example the dataset of dataset-upload)
payload[].tagsNumber of images of each tag, by tag id
payload[].classesThe tag ids
payload[].imageCountSum of the tag counts. Exact for classification and anomaly datasets; for segmentation, detection and OCR datasets an image with several tags counts several times
reasonWhy the message was sent (see below)
datasetsCountNumber of datasets
timestampWhen the message was sent, ISO 8601
options{ label: name, value: id } for each dataset

The datasets listed are those that have a type and are not deleted or hidden. The type itself is not in the message.

When the node sends ​

reasonWhen
refreshThe firebase-config node loaded the list: when it connects or reconnects, when a dataset changes in Firebase (1.5 seconds after the change), and when Refresh is clicked in its dialog
startupThe node started while the connection was already up (for example after redeploying only this node)
manualAn input message
updateA dataset was created with Create new dataset in dataset-upload
resetConnect was clicked in the dialog of the deployed firebase-config node: the list is empty, and a refresh follows

Node Status ​

StatusMeaning
green dot loaded: N datasetsList sent on startup
green dot updated: N datasetsList sent on refresh, manual or update
green dot reset: 0 datasetsList sent on reset
red ring invalid output fieldThe Output field cannot be set; the node logs Failed to set output field '<field>': <reason>
red ring missing firebase-configNo Firebase config selected; the node logs Missing firebase-config reference and does nothing else

The connection statuses (connecting, connected, waiting for firebase, an error text) are described in Firebase Config.

Example ​

Fill a dashboard dropdown with the datasets and keep it up to date: wire list-dataset to a function node that keeps the options, then to the dropdown (ui_dropdown takes its options from msg.options).

javascript
// Only the datasets that have at least 100 images of the tag "OK"
msg.options = msg.payload
  .filter(ds => (ds.tags.OK || 0) >= 100)
  .map(ds => ({ [ds.name]: ds.id }));
delete msg.payload;
return msg;

To refresh the list on demand, wire an inject node to list-dataset.

See Also ​