Publishing Data
SAL can publish the same built data product in two ways:
sal pushpackages.sal/dataas an OCI artifact.sal uploaddeploys.sal/datato an object store bucket.
Build locally first with sal build.
Push to an OCI registry
Section titled “Push to an OCI registry”Use sal push when you want a portable artifact that records the source Git repository and commit hash:
sal push ghcr.io/my-org/my-data-product --username "$OCI_USERNAME" --password "$OCI_PASSWORD"The pushed artifact is tagged as latest and with the current Git commit hash.
SAL adds OCI annotations that connect the artifact back to the source repository and commit, and its description ends with the --message of the latest build, so the registry says what the data product last changed.
Consumers can use sal clone to clone the source repository, check out the pinned commit, initialize SAL, and restore the data product into .sal/data.
Upload to object storage
Section titled “Upload to object storage”Use sal upload when readers should query the Iceberg table directly from an object store:
sal upload --bucket gs://my-bucket/sal/triplesSupported object-store URL forms include gs://, s3://, azblob://, and Google Cloud Storage HTTPS URLs such as:
sal upload --bucket https://storage.googleapis.com/my-bucket/sal/triplesDuring upload, SAL stages a temporary copy of .sal/data, rewrites Iceberg metadata paths to the destination, and uploads the staged files.
The local .sal/data directory is left unchanged.
Query a deployed table
Section titled “Query a deployed table”After uploading to object storage, query the table with DuckDB’s Iceberg extension:
SET enable_object_cache = false;
SELECT subject, predicate, objectFROM iceberg_scan('gs://my-bucket/sal/triples')LIMIT 5;For more detail about where SAL writes generated files, see Data Layout.
Deploy a query endpoint on Google Cloud
Section titled “Deploy a query endpoint on Google Cloud”sal terraform writes a Terraform configuration that serves the data product from Cloud Run, reading it from a Cloud Storage bucket, and sal init writes the same files with --with-iac. The project’s Makefile runs it:
sal terraform --project my-gcp-project # writes terraform/; or sal init --with-iacmake apply # terraform init && terraform applysal build --message "Add the station data" data/make upload # sal upload --bucket gs://<bucket>/terraform -chdir=terraform output service_urlWhat it creates:
- A bucket in the chosen region, with uniform access and public access prevention, holding the copy of
.sal/datathatsal upload --bucket gs://<bucket>/writes: the Iceberg table under the project’s name, the pinned vocabulary documents underblobs/, and the STAC catalog understac/. - A service account with
roles/storage.objectVieweron that bucket and nothing else. - A Cloud Run service running the
salimage with the bucket mounted read-only at/mnt/salthrough Cloud Storage FUSE, started assal serve --data /mnt/sal. DuckDB reads the Iceberg table as local files through the mount, so the service account’s access is the only credential involved and no key is written anywhere. The service isallUsers-invokable by default, answering SPARQL at/sparql, the catalog at/stac/catalog.json, and the vocabulary documents at/blobs/.
The bucket and the service are created in one region, so a query never crosses one; the service runs in the second generation environment the FUSE mount needs, with CPU allocated only while a request is handled and a startup boost for DuckDB’s open; and the mount caches file metadata for five minutes, since Iceberg files never change in place and sal upload writes new names, so a running instance sees a fresh upload within that time and a new one at once. The defaults are deliberately small (one CPU, 2 GiB, no warm instance, at most two, twenty concurrent requests) and all of them are variables in terraform/variables.tf; min_instances = 1 removes the cold start at a steady cost, and with_ui = true serves the browser UI, which is off by default because its SQL endpoint runs arbitrary DuckDB statements against whatever the service can reach. make destroy removes the service and the bucket; the bucket must be emptied first unless bucket_force_destroy = true, so a destroy never deletes a data product by accident.
terraform/terraform.tfvars holds the project ID and is meant to be committed; the state file is gitignored and belongs in a remote backend once more than one person applies the configuration.

