Skip to content

Getting Started

SAL projects are ordinary Git repositories with a .sal workspace for generated data. The source files stay in your repository; the Iceberg table generated by SAL lives under .sal/data.

Install the CLI with Go:

Terminal window
go install -a github.com/cgs-earth/sal@latest

SAL also expects Git for project metadata. DuckDB is linked into sal rather than shelled out to, so there is no DuckDB to install. It is a C++ library, though, so building sal needs cgo and a C toolchain (build-essential on Debian or Ubuntu, the Xcode command line tools on macOS).

Run sal init from the root of a Git repository that already has a remote:

Terminal window
sal init

This creates the local SAL data directory and adds .sal/data to .gitignore. Generated data is not meant to be committed to source control.

Read more about the generated files in Data Layout.

SAL finds RDF files in the paths you pass to sal validate or sal build. Use Turtle or JSON-LD for source data.

Terminal window
sal validate data/

Validation checks that RDF parses correctly and that prefixed terms resolve against their vocabularies. If you need to remap vocabulary prefixes while validating, pass one or more --prefix-maps values.

After source changes are committed, build the local Iceberg table:

Terminal window
sal build data/

By default, SAL writes an Iceberg table. For validation-only workflows or debugging, see sal validate and the --format option in sal build.

Open the built table in the SQL shell:

Terminal window
sal query

SAL creates a triples view in the shell. From there, run SQL such as:

SELECT subject, predicate, object
FROM triples
LIMIT 10;

Next, publish the generated table using Publishing Data.