: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.
Python ab-testingai-analyticsanalyticscdpdata-warehouseexperimentsfeature-flagsjavascriptproduct-analyticspythonreactsession-replaysurveystypescriptweb-analytics
feat(data-warehouse): add 2 missing tables to the ServiceNow source (#128437)
Tom Owers4fb50edb10e7
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.mdindex 4f70b0ce405e..9823a4edc8b1 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@@ -10912,8 +10912,8 @@ Diffed against: <https://www.servicenow.com/docs/r/zurich/it-service-management/- [x] `metric_instance (Metric instance table)` — Per-field duration records (time in each state, time per assignee) generated by the metric engine — the raw data behind MTTR and state-dwell analysis (high)- [x] `sys_choice (Choice table)` — Lookup that translates the numeric state/priority/impact/urgency codes stored on every synced task table into labels; without it incidents.state is an unreadable integer (high)- [x] `service_offering (Service Offering table)` — Lookup resolving the service offering referenced by incidents and change requests, and where resolution-time commitments live (medium)-- [ ] `cmdb_ci_service_business and cmdb_ci_service_technical (Business Service / Technology Management Service)` — Service dimension referenced by incidents and changes; configuration_items (cmdb_ci) does not cover the service classes used for business-impact reporting (medium)-- [ ] `Group Members (user-to-group membership related list on sys_user_group)` — users and user_groups are both synced but the many-to-many join between them is not, so assignment-group headcount and workload-per-member cannot be computed (medium)+- [x] `cmdb_ci_service_business and cmdb_ci_service_technical (Business Service / Technology Management Service)` — Service dimension referenced by incidents and changes; configuration_items (cmdb_ci) does not cover the service classes used for business-impact reporting (medium)+- [x] `Group Members (user-to-group membership related list on sys_user_group)` — users and user_groups are both synced but the many-to-many join between them is not, so assignment-group headcount and workload-per-member cannot be computed (medium)Note: ServiceNow's Table API is generic — /api/now/table/{table} can query any table — but the PostHog source hardcodes 13 ITSM tables in settings.py (SERVICENOW_ENDPOINTS) and get_schemas returns build_endpoint_schemas(ENDPOINTS, ...) with no dynamic table discovery. Adding a table is a one-line settings entry, so these gaps are cheap to close. ServiceNow's docs site is a JavaScript-only Fluid Topics app; the resource content above was read via its content API (https://www.servicenow.com/docs/api/khub/maps/{mapId}/topics/{topicId}/content), not the HTML pages. Field-level change history (the audit/history tables) is very likely another high-value gap but I could not confirm its exact table name in a vendor doc, so it is not listed.diff --git a/products/warehouse_sources/backend/temporal/data_imports/sources/servicenow/canonical_descriptions.py b/products/warehouse_sources/backend/temporal/data_imports/sources/servicenow/canonical_descriptions.pyindex e4f4b79f8283..4d691458ddf7 100644--- a/products/warehouse_sources/backend/temporal/data_imports/sources/servicenow/canonical_descriptions.py+++ b/products/warehouse_sources/backend/temporal/data_imports/sources/servicenow/canonical_descriptions.py@@ -255,4 +255,21 @@ CANONICAL_DESCRIPTIONS: CanonicalDescriptions = {name="Name of the service offering.",),},+ "services": {+ "description": "A service from the CMDB, such as a business service or a technology management service, referenced by incidents and changes (ServiceNow `cmdb_ci_service` table).",+ "docs_url": "https://www.servicenow.com/docs/r/australia/servicenow-platform/common-service-data-model-csdm/sell-consume-domain.html",+ "columns": _columns(+ name="Name of the service.",+ service_classification="Type of the service, such as Business Service or Technical Service.",+ sys_class_name="CMDB class of the record, such as `cmdb_ci_service_business` or `cmdb_ci_service_technical`.",+ ),+ },+ "group_members": {+ "description": "One membership of a user in a group, the many-to-many join between users and groups (ServiceNow `sys_user_grmember` table).",+ "docs_url": "https://www.servicenow.com/docs/r/australia/now-intelligence/performance-analytics/t_CreateABreakdownRelation.html",+ "columns": _columns(+ user="User who is a member of the group.",+ group="Group that the user is a member of.",+ ),+ },}diff --git a/products/warehouse_sources/backend/temporal/data_imports/sources/servicenow/settings.py b/products/warehouse_sources/backend/temporal/data_imports/sources/servicenow/settings.pyindex 4997b4590898..d78348556e09 100644--- a/products/warehouse_sources/backend/temporal/data_imports/sources/servicenow/settings.py+++ b/products/warehouse_sources/backend/temporal/data_imports/sources/servicenow/settings.py@@ -56,6 +56,10 @@ SERVICENOW_ENDPOINTS: dict[str, ServiceNowEndpointConfig] = {"metric_instances": ServiceNowEndpointConfig(name="metric_instances", table="metric_instance"),"choices": ServiceNowEndpointConfig(name="choices", table="sys_choice"),"service_offerings": ServiceNowEndpointConfig(name="service_offerings", table="service_offering"),+ # The core service table also holds its Business Service and Technology Management Service child+ # classes, plus business services from instances that have not moved them to the child table yet.+ "services": ServiceNowEndpointConfig(name="services", table="cmdb_ci_service"),+ "group_members": ServiceNowEndpointConfig(name="group_members", table="sys_user_grmember"),}ENDPOINTS = tuple(SERVICENOW_ENDPOINTS.keys())