Skip to main content

Quick Start

This guide gets you from zero to a validated Spine data product using the Dataspine CLI. Spine is the .spine language for declaring types, ingests, outlets, and stream flows. Full reference: Spine language.

Prerequisites

1. Create a Spine file

Create a directory and a single source file, for example spine-src/main.spine:

namespace com.example {
Struct Event {
message: String,
}

Ingest EventIngest {
name: "EventIngest",
type: Event,
}

Outlet EventOutlet {
name: "EventOutlet",
type: Event,
}

flow = EventIngest.map(e -> e).publish(EventOutlet)
}

This is a minimal pass-through map to one outlet, with a namespace suited to local experimentation.

2. Check and compile

From the project root (parent of spine-src/):

dataspine check --source-dir ./spine-src --root-namespace com.example

To emit a build artifact:

dataspine compile \
--source-dir ./spine-src \
--root-namespace com.example \
--out ./build/artifact.json

Add --lib pointing at extra type libraries if your Spine references external types.

3. Next steps