Skip to main content
Version: v1.0.3

Worked examples

Each example maps one real public dataset from beginning to end: where the data comes from, the mapping that shapes it, the command that runs it, and the entities that come out. The order is a reading order, so each one builds on the ones before it.

The mappings, manifests, and schemas themselves live in vela-tools/cassiopeia-examples, where a runner executes every example and checks its output against what its page claims.

JSON field mapping → ChemicalElement

Map a JSON array to ChemicalElement entities and type one copied field as a number.

ID collisions → City

See how a weak city ID merges records, then add a geohash from the coordinates.

GeoJSON Smart Data Model → OffStreetParking

Map GeoJSON to OffStreetParking and validate it against the published schema.

CSV conditionals → BikeHireDockingStation

Read a semicolon-delimited CSV, translate codes, and build an address object.

Attribute guards → OffStreetParking

Combine conditional values with constants and omit invalid source values.

Messy CSV headers → MonthlyPrecipitationObserved

Address unusual Latin-1 CSV headers and parse comma decimals.

observedAt observations → GoldPriceObserved

Keep monthly measurements under one entity ID with observedAt.

LanguageProperty → Region

Build a LanguageProperty and read a hyphenated source key.

Manifests → Airport Airline

Use a manifest to map two headerless CSV files in one run.

JSON relationships → Region Subregion Country State

Connect region, subregion, country, and state entities.

CSV relationship graph → Flight Airport Airline AircraftModel Country

Link routes, airports, airlines, aircraft models, and countries.

ListRelationship → Flight Airport Airline AircraftModel Country

Use a ListRelationship when one route has several aircraft models.

Synthetic entities → Mountain Country

Create country entities from a mountain's country field.

XML unit codes → WeatherObserved

Map XML measurements with unitCode and observedAt.

Shapefile enums → Port

Read a zipped shapefile and decode its coded columns.

KMZ namespacing → ParkPointOfInterest

Package a KML as a KMZ, namespace its records by folder, and pass placemark geometry through.

KML collections → CitiBikeStation BikeRentalShop Sightseeing PublicRestroom

Route four KML folders to four mappings.

GRIB1 derived values → WeatherObserved

Derive weather values from GRIB1 components.

GRIB2 byte ranges → WeatherObserved

Fetch selected GRIB2 fields by byte range.

Local @context → ExoPlanet Star

Define a JSON-LD context for an invented model, and materialise its host star as a second entity.

JSON datasetId → WeatherForecast

Keep forecasts from several models under one attribute.

Temporal to broker → TropicalCyclone

Fold a track and deliver it to Scorpio.

Scheduling → AirQualityObserved

Poll a sensor feed and upsert entities on a schedule.

ListProperty → BicycleCounter

Store hourly counts in an ordered ListProperty.

JsonProperty → WeatherAlert

Keep an alert's changing parameters object in a JsonProperty.

VocabProperty → UrbanMobilityPoint

Turn an OpenStreetMap tag into a VocabProperty IRI.

Custom schemas → ExoPlanet Star

Validate two invented models against two local JSON Schemas in one run.

Advanced schema validation → FoodProduct

Validate wrappers and metadata in normalized output.

Multi-attribute relationships → Flight Airport Airline AircraftModel Country

Give a Flight one servesAirport name for its departure and arrival airports, distinguished by datasetId.

Nested relationships → Movie

Give a Movie's hasLeadActor relationship a nested playsCharacter relationship and a billingOrder property.

Geometry conversion → Region

Demote an administrative region's MultiPolygon to the largest Polygon and derive a map-pin centroid beside it.