Public
Public
The public command works with the community models hosted at trilogy-data/trilogy-public-models. It is the fastest way to get a real, non-trivial model on disk to read or query.
Usage
trilogy public list [options]
trilogy public fetch <model> [path] [options]
trilogy public list
Lists available public models from the studio index.
| Option | Description |
|---|---|
-e, --engine TEXT | Filter by engine. |
-t, --tag TEXT | Filter by tag. |
trilogy public list
trilogy public list --engine bigquery
trilogy public list --tag retail
trilogy public fetch
Fetches a public model by name, writing its files locally. Creates a directory containing all source files, setup scripts, and - optionally - example assets.
| Argument / Option | Description |
|---|---|
model | Name of the model to fetch. |
path | Destination directory. |
--examples / --no-examples | Also download example scripts and dashboards. Default: include. |
-f, --force | Overwrite existing files if the target directory is not empty. |
# Fetch a model, examples included
trilogy public fetch usa_names
# Into a specific directory, model files only
trilogy public fetch tpc_ds ./models/tpc_ds --no-examples
# Overwrite an existing checkout
trilogy public fetch usa_names -f
Typical Flow
trilogy public list
trilogy public fetch usa_names ./usa_names
cd usa_names
trilogy explore .
trilogy serve .
Notes
- Fetched models are ordinary
.preqlfiles - edit them freely trilogy refreshandtrilogy servework against a fetched model directly- The separate
trilogy-public-modelsPython package exposes the same models for programmatic use; see Installation