Skip to main content
Getting started

Typical data flow

The nodes of the library are designed to be chained: a source delivers raw data, a builder shapes it into an NGSI-LD entity, and a publisher writes it to the context broker.

Data format
NGSI-LD (JSON-LD)
Data models
Smart Data Models
Context broker
Stellio

The chain at a glance​

Inject

Trigger

An Inject node starts the fetch on a schedule, for example every 10 minutes.

Data Connector

Fetch

A connector retrieves data from the source and emits it as a structured object, often already modelled on a Smart Data Model.

NGSI-LD Builder

Transform

The builder turns it into a valid NGSI-LD entity with type, URN identifier, attributes and @context.

Post to Stellio

Publish

The publisher creates or updates the entity in the context broker.

Result: The data is available through the NGSI-LD interface of the platform for dashboards, apps and subscriptions.

Not every flow needs all links of the chain. Some connectors already deliver complete NGSI-LD entities that you pass directly to Post to Stellio. Others deliver flat objects that the NGSI-LD Builder first maps to the target model. Each node page states under Output which format the node delivers.

What NGSI-LD and Smart Data Models are​

NGSI-LD is an ETSI standard for describing context information. An entity represents a real-world object, for example a weather station or a charging point. It has a unique identifier in the form of a URN such as urn:ngsi-ld:WeatherObserved:station-001, a type and attributes. Attributes are either Properties (values such as temperature), GeoProperties (geometries such as a location) or Relationships (references to other entities).

Smart Data Models are freely available, agreed data models for typical smart city objects. The nodes of this library follow models such as WeatherObserved, WaterObserved, AirQualityObserved, EVChargingStation or NewsObserved. This allows data from different sources to be evaluated uniformly.

The Stellio context broker stores the entities, answers queries and notifies subscribers about changes. In the Urban Data Space Platform, Stellio is the central store for current state data.

Example: weather data into the context broker​

The following flow fetches the current weather forecast of the German Weather Service every 10 minutes and writes it to Stellio as a WeatherObserved entity.

Step 1

Inject

Interval 600 seconds, trigger once on deploy.

Step 2

DWD Weather

Choose a station and enable the parameters you need.

Open node
Step 3

NGSI-LD Builder

Entity type WeatherObserved, derive the identifier from the station ID.

Open node
Step 4

Post to Stellio

Enter broker URL and tenant, create or update the entity.

Open node

Further patterns​

Enriching data​

Between connector and builder you can insert Utility nodes. The Geocoder adds an address to coordinates or vice versa, the Location Group assigns measurement points to an area.

Reacting to changes​

Instead of writing data, flows can also react to changes in the broker. With Stellio Create Subscription you create a subscription whose notifications are received by an HTTP In node in Node-RED.

Serving data​

The PostgreSQL CSV API node exposes database content as a CSV endpoint, for example for spreadsheets or analysis tools.

Recommendations for operation​

  • Choose intervals sensibly. Many sources update their data only every 10 to 60 minutes. More frequent polling only creates load.
  • Catch errors. One Catch node per flow collects the errors of the nodes and writes them to a log or a notification.
  • Maintain credentials centrally. Use environment variables or Node-RED credentials instead of storing values in Function nodes.
  • Check data protection. Before data reaches the broker, clarify whether it contains personal information, such as vehicle identifiers or names in feeds.