docs/datasets-json.md
datasets.json setup
datasets.json defines local pipeline inputs: roots, source discovery, and
SQLite output paths. The web app does not read this file directly; it reads the
datasets table inside SQLite/D1.
The file is not meant to be committed with machine-specific paths. Start from
datasets.json.example and create your own local datasets.json in the repo root.
Basic flow
- Copy
datasets.json.exampletodatasets.json - Update the dataset paths for your machine
- Make sure each dataset has a unique
dataset_id - Run the pipeline; new v2 SQLite databases are seeded with a
datasetsrow - Set
DEFAULT_DATASETin.envif you want one dataset to be used by default
Example
json
| 1 | [ |
| 2 | { |
| 3 | "dataset_id": "uoregon", |
| 4 | "label": "UONet-in", |
| 5 | "root_path": "/path/to/netflow_datasets/uoregon", |
| 6 | "db_path": "./data/uoregon/netflow.sqlite", |
| 7 | "default_start_date": "2025-02-11", |
| 8 | "source_mode": "subdirs", |
| 9 | "discovery_mode": "live" |
| 10 | } |
| 11 | ] |
Fields
dataset_id: stable slug used in routes and the pipeline--datasetflaglabel: human-readable display name for the web approot_path: root directory containing the dataset's prepared NetFlow filesdb_path: SQLite output path for that datasetdefault_start_date: default dashboard start date inYYYY-MM-DDsource_mode: currentlysubdirs, meaning each top-level subdirectory is treated as a source/routerdiscovery_mode: descriptive only for now; uselivefor synced data andstaticfor imported datasets
Notes
db_pathcan be relative to the repo rootroot_pathis usually absolute- if you want to store the config somewhere else, point
DATASETS_CONFIG_PATHin.envat that file - local web discovery scans
data/*/netflow.sqliteand reads each database'sdatasetstable