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 SAL
Section titled “Install SAL”Install the CLI with Go:
go install -a github.com/cgs-earth/sal@latestSAL 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).
Initialize a repository
Section titled “Initialize a repository”Run sal init from the root of a Git repository that already has a remote:
sal initThis 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.
Add RDF files
Section titled “Add RDF files”SAL finds RDF files in the paths you pass to sal validate or sal build.
Use Turtle or JSON-LD for source data.
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.
Build the data product
Section titled “Build the data product”After source changes are committed, build the local Iceberg table:
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.
Query the result
Section titled “Query the result”Open the built table in the SQL shell:
sal querySAL creates a triples view in the shell.
From there, run SQL such as:
SELECT subject, predicate, objectFROM triplesLIMIT 10;Next, publish the generated table using Publishing Data.