Data stores
A data store is a read-only connection to the warehouse that holds your POS, labor, and review data. UnitOps queries it to power KPIs, dashboards, ML forecasts, and grounded AI answers.
Page: Admin -> Data Stores (/admin/data-store) · Role required: admin
Supported vendors
Snowflake, Databricks, BigQuery, Redshift, Postgres, MySQL, and other JDBC-style sources.
Before you start
Ask your data team for a read-only service user scoped to the analytics schema. UnitOps never issues writes, and generated SQL is validated to be read-only before it runs, but a least-privilege credential is still the right practice.
Collect: account or host, warehouse or HTTP path, database or catalog, schema, and the credential (password, key pair, or service-account JSON).
Add a data store
-
Go to Admin -> Data Stores.
-
Click Add Data Store.
-
Fill in the connection fields. Which fields appear depends on the vendor:
Vendor Fields Snowflake Account, user, password or private key, warehouse, database, schema, role Databricks Host, HTTP path, access token, catalog, schema BigQuery Project, dataset, service-account JSON (paste or upload the file) Redshift / Postgres / MySQL Host, port, database, schema, user, password -
Optionally add Additional connection params as JSON for driver-specific options.
-
Click Save. The page confirms "Data store added."
If a file upload fails with "Couldn't read file. Try pasting the contents instead.", paste the JSON directly into the field.
Set the default store
Click Set default on the row you want the app to use for KPIs and dashboards when a query does not name a store explicitly. The default is marked with a Default badge.
Browse the schema and dbt models
- Browse schema opens the schema explorer for the store, listing databases, schemas, tables, and columns that UnitOps can see.
- dbt models lists the dbt models discovered for the store, which is useful when you are writing SQL for a custom dashboard.
- Clear cache forces UnitOps to re-read the schema after your data team adds tables or columns. Run it if a new table does not appear.
Activate, edit, and delete
- Edit - pencil icon, change fields, then save. Leave a credential field blank to keep the stored secret ("Keep existing / use ref").
- Active / Inactive - untick Active to stop UnitOps from querying a store without deleting it.
- Delete - trash icon, then confirm.
What UnitOps expects in the warehouse
| Concept | Notes |
|---|---|
DIM_STORES | Store dimension used as the location source of truth for joins |
STORE_KEY | The identifier that joins POS and labor data to a UnitOps location |
| Sales facts | Net sales, guest count, check count, at day or slot grain |
| Labor facts | Hours and cost by position and day |
Match each UnitOps location to a warehouse store key so KPIs resolve. If a dashboard renders but shows no rows, this mapping is the first thing to check.
Troubleshooting
| Symptom | Fix |
|---|---|
| "Fill in at least one credential field." | The form was submitted with every credential blank; enter one or use an existing secret reference |
| "Failed to fetch schemas" | Credentials are valid but the role cannot see the schema; grant USAGE on the database and schema |
| New table missing | Click Clear cache on the data store row |
| Dashboard empty | Confirm the store is Active and marked Default, and that the location maps to a store key |