Agent context
Fourth models
5 SQL models that turn the raw Fourth tables into the reports people ask about. Deploy them in Weld and your agent queries the definitions behind every number.
How the set is built
- 5Raw tables
- 5Staging
- 7Core
- 5Analytics
Staging cleans each raw table once, core holds the logic, and analytics is the table dashboards and agents read.
- Labour cost dailyLabour hours and cost per day and department, split by Fourth's payroll type, pay part and status.grain: date x department x payroll type x pay part x status · 3 raw tables
- Labour vs salesLabour cost as a share of sales, and sales per labour hour, per day and department. The headline wage-percentage view in Fourth.grain: date x department · 4 raw tables
- Sales forecast accuracyHow close Fourth's system forecast and the manager's forecast came to actual sales, per day, department and sales type. Forecasts drive the rota, so a forecast that runs high is labour cost spent on empty tables.grain: date x department x sales type · 3 raw tables
- Staffing accuracyFourth's productivity view: of the hours worked each day, how many were at the right staffing level, and how many under or over the requirement.grain: date x location · 1 raw table
- Weekly budget vs actualBudgeted sales and labour against actuals, per budget week, location and department.grain: budget week x location x department · 4 raw tables
- Weld or dbt
- The same SQL in both dialects. Sync the folder with GitHub Sync, or copy the dbt models into your project.
- Check before you rely on it
- Reconcile a month against Fourth's own reports first. Each model's notes say what the synced data can and can't support.
Connect Fourth.
Your agents start with context.
Sync Fourth to your warehouse, deploy these models, and query them from Claude, Cursor or ChatGPT over MCP. Free for 14 days, no credit card.