HiBob model
Time off daily
Time off taken or booked, per day, person and policy.
- Grain
- date x employee x policy type x request status
- Built from
- 3Raw tables
- 3Staging
- 1Core
- 1Analytics
- Reads from HiBob
- employeetime_offtimeoff_durations
- Ships as
- Weld and dbt SQL, open source on GitHub
core.hibob.time_off_daily
1-- core.hibob.time_off_daily
2-- Time off taken or booked, per day, person and policy.
3-- Grain: date x employee x policy type x request status.
4--
5-- Built from the per-day breakdown HiBob attaches to each request, so a
6-- two-week holiday shows on each working day it covers with the hours it takes
7-- that day. Status is approved or pending; filter to approved for time actually
8-- granted. Future-dated requests are included, so this doubles as a "who's out
9-- next month" view.
10--
11-- Department is the person's CURRENT department.
12
13SELECT
14 d.date,
15 d.employee_id,
16 COALESCE(e.display_name, r.employee_display_name) AS employee_name,
17 e.department,
18 e.site,
19 r.policy_type,
20 r.policy_type_name,
21 r.status,
22 COUNT(DISTINCT d.request_id) AS requests,
23 ROUND(SUM(d.hours), 2) AS hours_off
24FROM {{staging.hibob.time_off_day}} d
25JOIN {{staging.hibob.time_off_request}} r USING (request_id)
26LEFT JOIN {{staging.hibob.employee}} e ON e.employee_id = d.employee_id
27GROUP BY 1, 2, 3, 4, 5, 6, 7, 8This model and the 4 it depends on. Deploy them together; refs like {{staging.…}} resolve to the matching folders in Weld, and the dbt view uses source() and ref().
Notes
How it counts. And where it stops.
Built from the per-day breakdown HiBob attaches to each request, so a two-week holiday shows on each working day it covers with the hours it takes that day. Status is approved or pending; filter to approved for time actually granted. Future-dated requests are included, so this doubles as a "who's out next month" view. Department is the person's CURRENT department.
Raw tables it reads
- raw.hibob.employee
- raw.hibob.time_off
- raw.hibob.timeoff_durations
More HiBob models
Put HiBob in front
of your agents.
Connect HiBob, deploy the models, and ask questions in Claude, Cursor or ChatGPT. Free for 14 days, no credit card.