: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 granola spaces table (#119232)
Tom Owersb430e7beecb2
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 75aec5e82e5d..484d028181d6 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@@ -5522,13 +5522,14 @@ Note: Read the full Incident RPC reference and the current OnCall alerts and sch## Granola — adequate-Today (3): `folders`, `notes`, `transcripts`+Today (4): `folders`, `notes`, `spaces`, `transcripts`Diffed against: <https://docs.granola.ai/api-reference/openapi.json>- [x] `transcripts (GET /v1/notes/{note_id}/transcript)` — cursor-paginated transcript items per note, added in API v1.4.0 for transcripts too large to return inline. Shipped as `transcripts`, fanned out over the notes listing (full refresh).+- [x] `spaces (GET /v1/spaces)` — cursor-paginated list of the spaces the API key can access, added in API v1.6.0; resolves the `space_id` now carried on folders. Shipped as `spaces` (full refresh, no timestamp fields or time filter).-Note: The public OpenAPI declares only 5 paths: /v1/folders, /v1/notes, /v1/notes/{note_id}, and two webhook-endpoint management paths. PostHog's folders + notes tables cover every non-config resource in the API.+Note: PostHog's folders, notes, spaces and transcripts tables cover the note-data resources in the public OpenAPI. The remaining paths are single-note lookups and webhook-endpoint, audit and legal-hold management.## Greenhouse — gapsdiff --git a/products/warehouse_sources/backend/temporal/data_imports/sources/granola/canonical_descriptions.py b/products/warehouse_sources/backend/temporal/data_imports/sources/granola/canonical_descriptions.pyindex 48f81d74d653..c6aefc5dd8d0 100644--- a/products/warehouse_sources/backend/temporal/data_imports/sources/granola/canonical_descriptions.py+++ b/products/warehouse_sources/backend/temporal/data_imports/sources/granola/canonical_descriptions.py@@ -29,6 +29,16 @@ CANONICAL_DESCRIPTIONS: CanonicalDescriptions = {"columns": {"id": "Unique identifier for the folder.","name": "Name of the folder.",+ "parent_folder_id": "ID of the parent folder, or null if the folder is top-level.",+ "space_id": "ID of the space the folder belongs to, or null if it is not in a space the API key can access.",+ },+ },+ "spaces": {+ "description": "A space in Granola that groups folders and notes, limited to the spaces the API key can access.",+ "docs_url": "https://docs.granola.ai/api-reference/list-spaces",+ "columns": {+ "id": "Unique identifier for the space.",+ "name": "Name of the space.",},},"transcripts": {diff --git a/products/warehouse_sources/backend/temporal/data_imports/sources/granola/settings.py b/products/warehouse_sources/backend/temporal/data_imports/sources/granola/settings.pyindex 6015f8d34314..879b4023f335 100644--- a/products/warehouse_sources/backend/temporal/data_imports/sources/granola/settings.py+++ b/products/warehouse_sources/backend/temporal/data_imports/sources/granola/settings.py@@ -56,6 +56,13 @@ GRANOLA_ENDPOINTS: dict[str, GranolaEndpointConfig] = {path="/v1/folders",data_key="folders",),+ # https://docs.granola.ai/api-reference/list-spaces+ # No timestamp fields and no server-side time filter - full refresh only.+ "spaces": GranolaEndpointConfig(+ name="spaces",+ path="/v1/spaces",+ data_key="spaces",+ ),# https://docs.granola.ai/api-reference/get-transcript# One row per transcript item, fanned out over the notes listing. Items carry no id, and the# endpoint has no server-side time filter, so this is full refresh only.diff --git a/products/warehouse_sources/backend/temporal/data_imports/sources/granola/tests/test_granola.py b/products/warehouse_sources/backend/temporal/data_imports/sources/granola/tests/test_granola.pyindex 8524f4a278b1..80efa1eb1849 100644--- a/products/warehouse_sources/backend/temporal/data_imports/sources/granola/tests/test_granola.py+++ b/products/warehouse_sources/backend/temporal/data_imports/sources/granola/tests/test_granola.py@@ -77,6 +77,7 @@ class TestValidateCredentials:(None, "/v1/notes"),("notes", "/v1/notes"),("folders", "/v1/folders"),+ ("spaces", "/v1/spaces"),("transcripts", "/v1/notes"), # fan-out child probes its parent listing("unknown", "/v1/notes"),],