: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 Recall.ai source (#117357)
Tom Owers20a2bcbb7c05
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 ca1823563e79..80bb7e8af97e 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@@ -10005,9 +10005,9 @@ Today (7): `bots`, `calendar_events`, `calendars`, `meeting_metadata`, `participDiffed against: <https://docs.recall.ai/llms.txt>-- [ ] `Desktop SDK uploads (GET /api/v1/sdk_upload/)` — resolve desktop_sdk_upload references on recordings and measure upload success or failure (high)+- [x] `Desktop SDK uploads (GET /api/v1/sdk_upload/)` — resolve desktop_sdk_upload references on recordings and measure upload success or failure (high)- [ ] `Usage (GET /api/v1/billing/usage/)` — compare bot usage totals with recording activity and allocated costs (high)-- [ ] `Meeting Direct Connects (GET /api/v1/meeting_direct_connect/)` — analyze connection status and recording activity for meetings captured without bots (medium)+- [x] `Meeting Direct Connects (GET /api/v1/meeting_direct_connect/)` — analyze connection status and recording activity for meetings captured without bots (medium)Note: The official documentation index was fetched with curl, followed by the embedded OpenAPI definitions on the missing resource pages. The recording schema confirms desktop_sdk_upload references, and usage returns workspace bot totals for a requested period. Older calendar-user and calendar-meeting endpoints overlap the imported v2 calendar resources. Media downloads, OAuth credentials, and realtime delivery configuration are excluded.diff --git a/products/warehouse_sources/backend/temporal/data_imports/sources/recall_ai/canonical_descriptions.py b/products/warehouse_sources/backend/temporal/data_imports/sources/recall_ai/canonical_descriptions.pyindex 436b3feba9fe..91a7338951ea 100644--- a/products/warehouse_sources/backend/temporal/data_imports/sources/recall_ai/canonical_descriptions.py+++ b/products/warehouse_sources/backend/temporal/data_imports/sources/recall_ai/canonical_descriptions.py@@ -103,4 +103,29 @@ CANONICAL_DESCRIPTIONS: CanonicalDescriptions = {"bots": "Bots scheduled to record this event.",},},+ "desktop_sdk_uploads": {+ "description": "Uploads created for recordings captured with the Desktop Recording SDK. One row per upload, with its status and the recording it produced. Upload tokens are removed before rows reach the warehouse.",+ "docs_url": "https://docs.recall.ai/reference/sdk_upload_list",+ "columns": {+ "id": "Unique identifier for the desktop SDK upload. Recordings reference it in desktop_sdk_upload.",+ "status": "Current upload status: code (pending, recording_started, recording_ended, uploading, complete, failed), sub_code, and updated_at.",+ "recording_id": "The recording produced by this upload, or null before a recording exists.",+ "created_at": "When the upload was created.",+ "metadata": "Arbitrary key-value metadata attached to the upload.",+ },+ },+ "meeting_direct_connects": {+ "description": "Meetings captured without a bot through Meeting Direct Connect (Zoom RTMS or the Google Meet Media API). One row per connection, with its status and the recordings it produced. Platform signatures and access tokens are removed before rows reach the warehouse.",+ "docs_url": "https://docs.recall.ai/reference/meeting_direct_connect_list",+ "columns": {+ "id": "Unique identifier for the Meeting Direct Connect.",+ "status": "Current connection status: code (pending, connecting, processing, complete, failed), sub_code, and updated_at.",+ "zoom_rtms": "Zoom RTMS stream details (meeting UUID, stream ID, server URLs), or null for other platforms.",+ "google_meet_media_api": "Google Meet Media API details (space name), or null for other platforms.",+ "recording_config": "The recording configuration requested for this connection.",+ "recordings": "Recordings produced by this connection, referencing rows in the recordings table.",+ "metadata": "Arbitrary key-value metadata attached to the connection.",+ "created_at": "When the Meeting Direct Connect was created.",+ },+ },}diff --git a/products/warehouse_sources/backend/temporal/data_imports/sources/recall_ai/recall_ai.py b/products/warehouse_sources/backend/temporal/data_imports/sources/recall_ai/recall_ai.pyindex 672d4448783a..1ecdca9645ad 100644--- a/products/warehouse_sources/backend/temporal/data_imports/sources/recall_ai/recall_ai.py+++ b/products/warehouse_sources/backend/temporal/data_imports/sources/recall_ai/recall_ai.py@@ -10,6 +10,7 @@ from products.warehouse_sources.backend.temporal.data_imports.sources.common.res)from products.warehouse_sources.backend.temporal.data_imports.sources.common.rest_source.paginators import (JSONResponsePaginator,+ SinglePagePaginator,)from products.warehouse_sources.backend.temporal.data_imports.sources.common.rest_source.typing import EndpointResourcefrom products.warehouse_sources.backend.temporal.data_imports.sources.common.resumable import ResumableSourceManager@@ -50,7 +51,12 @@ def _to_iso8601(value: Any) -> Optional[str]:def _scrub_fields(fields: tuple[str, ...]):def scrub(item: dict[str, Any]) -> dict[str, Any]:for field in fields:- item.pop(field, None)+ *parents, leaf = field.split(".")+ target: Any = item+ for parent in parents:+ target = target.get(parent) if isinstance(target, dict) else None+ if isinstance(target, dict):+ target.pop(leaf, None)return itemreturn scrub@@ -82,12 +88,15 @@ def get_resource(if should_use_incremental_fieldelse "replace","endpoint": {- "data_selector": "results","path": config.path,"params": params,- # Every list response carries an absolute next-page URL in its body, which also- # keeps any filter params on later pages.- "paginator": JSONResponsePaginator(next_url_path="next"),+ # Paginated list responses carry an absolute next-page URL in their body, which+ # also keeps any filter params on later pages.+ **(+ {"data_selector": "results", "paginator": JSONResponsePaginator(next_url_path="next")}+ if config.paginated+ else {"paginator": SinglePagePaginator()}+ ),},"table_format": "delta",}@@ -121,9 +130,10 @@ def recall_ai_source(# or internal destination. Pair host-pinning with rejecting redirects outright."allowed_hosts": [],"allow_redirects": False,- # Calendar rows carry OAuth client secrets/refresh tokens (scrubbed below before- # they reach the warehouse), which aren't covered by the generic sample denylist —- # disable diagnostic HTTP capture for this endpoint so raw responses are never stored.+ # Rows of scrubbed endpoints carry credentials (calendar OAuth secrets, SDK upload+ # tokens, meeting platform tokens), scrubbed below before they reach the warehouse,+ # which aren't covered by the generic sample denylist — disable diagnostic HTTP+ # capture for these endpoints so raw responses are never stored.**({"capture": False} if endpoint_config.scrub_fields else {}),},"resources": [get_resource(endpoint, should_use_incremental_field, db_incremental_field_last_value)],diff --git a/products/warehouse_sources/backend/temporal/data_imports/sources/recall_ai/settings.py b/products/warehouse_sources/backend/temporal/data_imports/sources/recall_ai/settings.pyindex dc9b431c676c..7d2144686b33 100644--- a/products/warehouse_sources/backend/temporal/data_imports/sources/recall_ai/settings.py+++ b/products/warehouse_sources/backend/temporal/data_imports/sources/recall_ai/settings.py@@ -13,8 +13,11 @@ class RecallAIEndpointConfig:incremental_param: str | None = Noneincremental_field: str | None = None# Response fields dropped before rows reach the warehouse (credentials the API echoes back).+ # A dotted path drops a key inside a nested object.scrub_fields: tuple[str, ...] = ()extra_params: tuple[tuple[str, str], ...] = ()+ # False for endpoints that return a bare JSON array instead of a cursor-paginated envelope.+ paginated: bool = TrueRECALL_AI_ENDPOINTS: dict[str, RecallAIEndpointConfig] = {@@ -67,6 +70,21 @@ RECALL_AI_ENDPOINTS: dict[str, RecallAIEndpointConfig] = {incremental_param="updated_at__gte",incremental_field="updated_at",),+ # The list takes only a cursor, and upload status changes after creation, so full refresh.+ # upload_token authorizes uploads into the workspace and never reaches the warehouse.+ "desktop_sdk_uploads": RecallAIEndpointConfig(+ path="/api/v1/sdk_upload/",+ partition_key="created_at",+ scrub_fields=("upload_token",),+ ),+ # Unpaginated and unfiltered, and status changes after creation, so full refresh. The+ # nested platform credentials (Zoom RTMS signature, Google Meet access token) are dropped.+ "meeting_direct_connects": RecallAIEndpointConfig(+ path="/api/v1/meeting_direct_connect/",+ partition_key="created_at",+ scrub_fields=("zoom_rtms.signature", "google_meet_media_api.access_token"),+ paginated=False,+ ),}ENDPOINTS = tuple(RECALL_AI_ENDPOINTS.keys())diff --git a/products/warehouse_sources/backend/temporal/data_imports/sources/recall_ai/tests/test_recall_ai.py b/products/warehouse_sources/backend/temporal/data_imports/sources/recall_ai/tests/test_recall_ai.pyindex 025b299081e3..ef4945a2bdfc 100644--- a/products/warehouse_sources/backend/temporal/data_imports/sources/recall_ai/tests/test_recall_ai.py+++ b/products/warehouse_sources/backend/temporal/data_imports/sources/recall_ai/tests/test_recall_ai.py@@ -22,7 +22,7 @@ from products.warehouse_sources.backend.temporal.data_imports.sources.recall_ai.BASE_URL = "https://us-east-1.recall.ai"-def _page(body: dict[str, Any]) -> ScriptedResponse:+def _page(body: Any) -> ScriptedResponse:return ScriptedResponse(json=body)@@ -88,27 +88,95 @@ class TestRecallAIPaginationAndResume:assert result.urls == [f"{BASE_URL}/api/v1/recording/"]-class TestRecallAICalendarScrubbing:- def test_oauth_secrets_never_reach_the_warehouse(self) -> None:- calendar = {- "id": "cal-1",- "platform": "google_calendar",- "oauth_client_id": "client-id",- "oauth_client_secret": "super-secret",- "oauth_refresh_token": "refresh-token",- "status": "connected",- }-- result = _drive("calendars", [_page({"next": None, "previous": None, "results": [calendar]})])-- assert result.rows == [- {- "id": "cal-1",- "platform": "google_calendar",- "oauth_client_id": "client-id",- "status": "connected",- }- ]+class TestRecallAICredentialScrubbing:+ @pytest.mark.parametrize(+ ("endpoint", "body", "expected_rows"),+ [+ (+ "calendars",+ {+ "next": None,+ "previous": None,+ "results": [+ {+ "id": "cal-1",+ "platform": "google_calendar",+ "oauth_client_id": "client-id",+ "oauth_client_secret": "super-secret",+ "oauth_refresh_token": "refresh-token",+ "status": "connected",+ }+ ],+ },+ [{"id": "cal-1", "platform": "google_calendar", "oauth_client_id": "client-id", "status": "connected"}],+ ),+ (+ "desktop_sdk_uploads",+ {+ "next": None,+ "previous": None,+ "results": [+ {+ "id": "upl-1",+ "status": {"code": "complete", "sub_code": None, "updated_at": "2026-02-01T09:00:00Z"},+ "recording_id": "rec-1",+ "upload_token": "fake-upload-token",+ "created_at": "2026-02-01T08:00:00Z",+ }+ ],+ },+ [+ {+ "id": "upl-1",+ "status": {"code": "complete", "sub_code": None, "updated_at": "2026-02-01T09:00:00Z"},+ "recording_id": "rec-1",+ "created_at": "2026-02-01T08:00:00Z",+ }+ ],+ ),+ # A bare JSON array with no pagination envelope. The platform objects nest the+ # credentials, and the platform a connection does not use is null.+ (+ "meeting_direct_connects",+ [+ {+ "id": "mdc-zoom",+ "zoom_rtms": {+ "meeting_uuid": "meeting-uuid-1",+ "rtms_stream_id": "stream-1",+ "server_urls": "wss://rtms.zoom.example.com",+ "signature": "fake-signature",+ },+ "google_meet_media_api": None,+ },+ {+ "id": "mdc-meet",+ "zoom_rtms": None,+ "google_meet_media_api": {"space_name": "spaces/abc", "access_token": "fake-access-token"},+ },+ ],+ [+ {+ "id": "mdc-zoom",+ "zoom_rtms": {+ "meeting_uuid": "meeting-uuid-1",+ "rtms_stream_id": "stream-1",+ "server_urls": "wss://rtms.zoom.example.com",+ },+ "google_meet_media_api": None,+ },+ {"id": "mdc-meet", "zoom_rtms": None, "google_meet_media_api": {"space_name": "spaces/abc"}},+ ],+ ),+ ],+ )+ def test_credentials_never_reach_the_warehouse(+ self, endpoint: str, body: Any, expected_rows: list[dict[str, Any]]+ ) -> None:+ result = _drive(endpoint, [_page(body)])++ assert len(result.urls) == 1+ assert result.rows == expected_rowsclass TestRecallAIHelpers: