Skip to content

:hedgehog: PostHog is the leading platform for building self-driving products. Our developer tools – AI observability, analytics, session replay, flags, experiments, error tracking, logs, and more – capture all the context agents need to diagnose problems, uncover opportunities, and ship fixes. Steer it all from Slack, web, desktop, or the MCP.

feat(warehouse-sources): add personio recruiting jobs and categories tables (#119540)

Tom Owers15e217d902d5
diff --git a/posthog/test/repo_invariants/dataclass_frozen_baseline.txt b/posthog/test/repo_invariants/dataclass_frozen_baseline.txt
index 88664ab9a903..a4c7aea359d6 100644
--- a/posthog/test/repo_invariants/dataclass_frozen_baseline.txt
+++ b/posthog/test/repo_invariants/dataclass_frozen_baseline.txt
@@ -887,7 +887,6 @@
1 products/warehouse_sources/backend/temporal/data_imports/sources/persona/persona.py
1 products/warehouse_sources/backend/temporal/data_imports/sources/persona/settings.py
1 products/warehouse_sources/backend/temporal/data_imports/sources/personio/personio.py
-1 products/warehouse_sources/backend/temporal/data_imports/sources/personio/settings.py
1 products/warehouse_sources/backend/temporal/data_imports/sources/pexels/pexels.py
1 products/warehouse_sources/backend/temporal/data_imports/sources/pexels/settings.py
1 products/warehouse_sources/backend/temporal/data_imports/sources/pganalyze/settings.py
diff --git a/products/warehouse_sources/backend/temporal/data_imports/sources/COVERAGE_GAPS_APPENDIX.md b/products/warehouse_sources/backend/temporal/data_imports/sources/COVERAGE_GAPS_APPENDIX.md
index 3d0af8b625fc..4a5724c2fc24 100644
--- a/products/warehouse_sources/backend/temporal/data_imports/sources/COVERAGE_GAPS_APPENDIX.md
+++ b/products/warehouse_sources/backend/temporal/data_imports/sources/COVERAGE_GAPS_APPENDIX.md
@@ -9319,7 +9319,7 @@ Note: Persona's own repo note (products/warehouse_sources/backend/temporal/data_
## Personio — **thin**
-Today (5): `absence_periods`, `attendance_periods`, `cost_centers`, `persons`, `salary_bands`
+Today (7): `absence_periods`, `attendance_periods`, `cost_centers`, `persons`, `recruiting_categories`, `recruiting_jobs`, `salary_bands`
Diffed against: <https://developer.personio.de/llms.txt>
@@ -9336,8 +9336,10 @@ Diffed against: <https://developer.personio.de/llms.txt>
- [ ] `GET /v2/recruiting/applications` — application pipeline records, the main recruiting funnel object (medium)
- [ ] `GET /v2/recruiting/applications/{id}/stage-transitions` — stage transition history - exactly the state-change data needed for time-in-stage metrics (medium)
- [ ] `GET /v2/recruiting/candidates` — candidate records joined to applications above (medium)
+- [x] `GET /v2/recruiting/jobs` — recruiting job postings that applications are submitted against; full refresh only, since updated_at is a date-time/timezone object (medium)
+- [x] `GET /v2/recruiting/categories` — recruiting category lookup with the ordered pipeline stages per category (medium)
-Note: PERSONIO_ENDPOINTS in products/warehouse_sources/backend/temporal/data_imports/sources/personio/settings.py is a static 5-entry dict (/v2/persons, /v2/absence-periods, /v2/attendance-periods, /v2/salary-bands, /v2/cost-centers) - no dynamic discovery. The v2 API exposes roughly 20 listable resources, so this is still a small fraction, and other organizational lookups that would let you group the synced persons and time data (org units, legal entities, jobs) are still missing. Salary bands and cost centers are dimension lookups with no updated_at/created_at field, so they sync full-refresh only. Exact paths confirmed from the individual reference .md pages. Recruiting endpoints are flagged beta by the vendor.
+Note: PERSONIO_ENDPOINTS in products/warehouse_sources/backend/temporal/data_imports/sources/personio/settings.py is a static 5-entry dict (/v2/persons, /v2/absence-periods, /v2/attendance-periods, /v2/salary-bands, /v2/cost-centers) - no dynamic discovery. The v2 API exposes roughly 20 listable resources, so this is still a small fraction, and other organizational lookups that would let you group the synced persons and time data (org units, legal entities, jobs) are still missing. Salary bands and cost centers are dimension lookups with no updated_at/created_at field, so they sync full-refresh only. Exact paths confirmed from the individual reference .md pages. The Recruiting API went GA on 2026-08-11 (no `Beta` header needed).
## Pexels — gaps
diff --git a/products/warehouse_sources/backend/temporal/data_imports/sources/personio/canonical_descriptions.py b/products/warehouse_sources/backend/temporal/data_imports/sources/personio/canonical_descriptions.py
index 65ad3de61f2e..0cd0c0120506 100644
--- a/products/warehouse_sources/backend/temporal/data_imports/sources/personio/canonical_descriptions.py
+++ b/products/warehouse_sources/backend/temporal/data_imports/sources/personio/canonical_descriptions.py
@@ -71,4 +71,28 @@ CANONICAL_DESCRIPTIONS: CanonicalDescriptions = {
"name": "The name of the cost center.",
},
},
+ "recruiting_jobs": {
+ "description": "A recruiting job (open position) in Personio, with its category, department and hiring team.",
+ "docs_url": "https://developer.personio.de/reference/get_v2-recruiting-jobs",
+ "columns": {
+ "id": "Unique identifier for the job.",
+ "name": "The job title.",
+ "company": "The company the job belongs to, carrying a company id.",
+ "department": "The department the job belongs to, with its id and name.",
+ "category": "The recruiting category of the job, with its id and name.",
+ "hiring_team": "Hiring team members assigned to the job, each with a person reference and a role name.",
+ "created_at": "Creation time of the job, as a date-time with UTC offset and an IANA time zone.",
+ "updated_at": "Last modification time of the job, as a date-time with UTC offset and an IANA time zone.",
+ },
+ },
+ "recruiting_categories": {
+ "description": "A recruiting job category in Personio, with the ordered pipeline stages applications move through.",
+ "docs_url": "https://developer.personio.de/reference/get_v2-recruiting-categories",
+ "columns": {
+ "id": "Unique identifier for the category.",
+ "name": "The name of the category.",
+ "company": "The company the category belongs to, carrying a company id.",
+ "stages": "Ordered list of recruiting stages for this category, each with a kind (custom or system) and a type.",
+ },
+ },
}
diff --git a/products/warehouse_sources/backend/temporal/data_imports/sources/personio/personio.py b/products/warehouse_sources/backend/temporal/data_imports/sources/personio/personio.py
index c9b62a53adf3..6ccd56671969 100644
--- a/products/warehouse_sources/backend/temporal/data_imports/sources/personio/personio.py
+++ b/products/warehouse_sources/backend/temporal/data_imports/sources/personio/personio.py
@@ -106,7 +106,9 @@ def personio_source(
resume = resumable_source_manager.load_state() if resumable_source_manager.can_resume() else None
- params: dict[str, Any] = {"limit": config.page_size}
+ params: dict[str, Any] = {}
+ if config.page_size is not None:
+ params["limit"] = config.page_size
if (
config.incremental_param is not None
and should_use_incremental_field
diff --git a/products/warehouse_sources/backend/temporal/data_imports/sources/personio/settings.py b/products/warehouse_sources/backend/temporal/data_imports/sources/personio/settings.py
index 995b72086bd8..076a7eecba08 100644
--- a/products/warehouse_sources/backend/temporal/data_imports/sources/personio/settings.py
+++ b/products/warehouse_sources/backend/temporal/data_imports/sources/personio/settings.py
@@ -13,7 +13,7 @@ _UPDATED_AT_INCREMENTAL_FIELDS: list[IncrementalField] = [
]
-@dataclass
+@dataclass(frozen=True)
class PersonioEndpointConfig:
name: str
path: str
@@ -24,8 +24,9 @@ class PersonioEndpointConfig:
# endpoint: persons use strict `.gt`, the period endpoints use `.gte`.
incremental_param: Optional[str] = None
incremental_fields: list[IncrementalField] = field(default_factory=list)
- # Max page size the endpoint accepts (persons cap at 50, periods at 100).
- page_size: int = 100
+ # Max page size the endpoint accepts (persons cap at 50, periods at 100). None for
+ # unpaginated endpoints, which then get no `limit` param.
+ page_size: Optional[int] = 100
# Stable creation-time field used for datetime partitioning.
partition_key: Optional[str] = None
@@ -66,6 +67,21 @@ PERSONIO_ENDPOINTS: dict[str, PersonioEndpointConfig] = {
path="/v2/cost-centers",
scope="personio:cost-centers:read",
),
+ # Recruiting jobs support `updated_at.gt`, but their updated_at/created_at are
+ # {"date-time", "timezone"} objects that can't serve as a cursor or partition column, and the
+ # listing is newest-first — so full refresh only.
+ "recruiting_jobs": PersonioEndpointConfig(
+ name="recruiting_jobs",
+ path="/v2/recruiting/jobs",
+ scope="personio:recruiting:read",
+ page_size=200,
+ ),
+ "recruiting_categories": PersonioEndpointConfig(
+ name="recruiting_categories",
+ path="/v2/recruiting/categories",
+ scope="personio:recruiting:read",
+ page_size=None,
+ ),
}
ENDPOINTS = tuple(PERSONIO_ENDPOINTS.keys())
diff --git a/products/warehouse_sources/backend/temporal/data_imports/sources/personio/source.py b/products/warehouse_sources/backend/temporal/data_imports/sources/personio/source.py
index 79284560e267..0ae5661754b8 100644
--- a/products/warehouse_sources/backend/temporal/data_imports/sources/personio/source.py
+++ b/products/warehouse_sources/backend/temporal/data_imports/sources/personio/source.py
@@ -67,7 +67,7 @@ class PersonioSource(ResumableSource[PersonioSourceConfig, PersonioResumeConfig]
label="Personio",
caption="""Enter your Personio API credentials to pull your Personio HR data into the PostHog Data warehouse.
-An admin can create API credentials in Personio under Settings > Integrations > API credentials. Grant the read scopes for the datasets you want to sync (`personio:persons:read`, `personio:absences:read`, `personio:attendances:read`, `personio:salary-bands:read`, `personio:cost-centers:read`) and whitelist the employee attributes you need — attributes that aren't whitelisted are silently omitted from responses.""",
+An admin can create API credentials in Personio under Settings > Integrations > API credentials. Grant the read scopes for the datasets you want to sync (`personio:persons:read`, `personio:absences:read`, `personio:attendances:read`, `personio:salary-bands:read`, `personio:cost-centers:read`, `personio:recruiting:read`) and whitelist the employee attributes you need — attributes that aren't whitelisted are silently omitted from responses.""",
iconPath="/static/services/personio.png",
docsUrl="https://posthog.com/docs/cdp/sources/personio",
releaseStatus=ReleaseStatus.ALPHA,
diff --git a/products/warehouse_sources/backend/temporal/data_imports/sources/personio/tests/test_personio.py b/products/warehouse_sources/backend/temporal/data_imports/sources/personio/tests/test_personio.py
index ac21b09b938b..fcbe740f3ab7 100644
--- a/products/warehouse_sources/backend/temporal/data_imports/sources/personio/tests/test_personio.py
+++ b/products/warehouse_sources/backend/temporal/data_imports/sources/personio/tests/test_personio.py
@@ -174,10 +174,20 @@ class TestGetRows:
assert result.requests[-1].param("updated_at.gt") is None
assert result.requests[-1].param("limit") == "50"
- @pytest.mark.parametrize("endpoint", ["salary_bands", "cost_centers"])
- def test_dimension_endpoint_never_sends_timestamp_filter(self, endpoint: str) -> None:
- # salary-bands and cost-centers have no updated_at field, so incremental_param is None. Even
- # if incremental is requested, the request must go out as a full refresh with no timestamp
+ @pytest.mark.parametrize(
+ "endpoint, expected_limit",
+ [
+ ("salary_bands", "100"),
+ ("cost_centers", "100"),
+ ("recruiting_jobs", "200"),
+ ("recruiting_categories", None),
+ ],
+ )
+ def test_full_refresh_only_endpoint_never_sends_timestamp_filter(
+ self, endpoint: str, expected_limit: str | None
+ ) -> None:
+ # These endpoints have no usable updated_at cursor, so incremental_param is None. Even if
+ # incremental is requested, the request must go out as a full refresh with no timestamp
# param — sending one the API ignores would silently claim a filtered sync.
result = _driver().run(
endpoint,
@@ -188,7 +198,7 @@ class TestGetRows:
assert result.raised is None
assert not any(key.startswith("updated_at") for key in result.requests[-1].query)
- assert result.requests[-1].param("limit") == "100"
+ assert result.requests[-1].param("limit") == expected_limit
def test_resumes_from_saved_state(self) -> None:
resume_url = "https://api.personio.de/v2/persons?cursor=cur_resume"