: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 1 missing table to the Bettermode source (#121293)
Tom Owersc71144b1fb5e
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 b3636b34284a..055690cfb37f 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@@ -1520,7 +1520,7 @@ Diffed against: <https://developers.beehiiv.com/api-reference>## Bettermode — **thin**-Today (12): `collections`, `members`, `moderation_items`, `post_reaction_participants`, `post_types`, `posts`, `replies`, `roles`, `space_members`, `space_post_types`, `spaces`, `tags`+Today (13): `collections`, `member_invitations`, `members`, `moderation_items`, `post_reaction_participants`, `post_types`, `posts`, `replies`, `roles`, `space_members`, `space_post_types`, `spaces`, `tags`Diffed against: <https://api.bettermode.com/ (live GraphQL introspection of queryType fields; 159 root queries)>@@ -1532,10 +1532,10 @@ Diffed against: <https://api.bettermode.com/ (live GraphQL introspection of quer- [ ] `eventRegistrations / memberEventRegistrations` — skipped: no such query, object, input, or enum in the current API reference. RSVP data, where present, lives in post custom fields rather than a queryable registrations collection.- [ ] `activityLogs` — skipped: appears only in the legacy Tribe schema listing; the current reference documents no `ActivityLog` object type, so a GraphQL selection set can't be verified without live introspection. Flagged for follow-up when API access is available.- [x] `postReactionParticipants` — per-reaction engagement records tied to posts we sync (medium), added here-- [ ] `tagPosts` — post-to-tag join; we sync both tags and posts but not the link (medium)-- [ ] `analytics` — vendor's aggregated community analytics reports (medium)-- [ ] `chats / messages / chatParticipants` — direct messaging is an entire engagement channel currently missing (medium)-- [ ] `memberInvitations` — invitation funnel data explaining member acquisition (medium)+- [ ] `tagPosts` — post-to-tag join; we sync both tags and posts but not the link (medium) — skipped: the link is already synced, because every row of the `posts` table carries `tagIds`. `tagPosts(tagId)` returns the same posts again, at one request per tag.+- [ ] `analytics` — vendor's aggregated community analytics reports (medium) — skipped: `analytics(queries: [String!]!)` runs caller-written report query strings and returns untyped `ReportRecord { entities, payload }` rows. It has no fixed resource to sync as a table, and the public reference documents no query language.+- [ ] `chats / messages / chatParticipants` — direct messaging is an entire engagement channel currently missing (medium) — skipped: these queries list the inbox of the authenticated member (`Chat.currentParticipant` is "the participation record of the authenticated user"). The source authenticates as an app, so no query lists the private chats of the whole community.+- [x] `memberInvitations` — invitation funnel data explaining member acquisition (medium), added here## BetterStack — gapsdiff --git a/products/warehouse_sources/backend/temporal/data_imports/sources/bettermode/canonical_descriptions.py b/products/warehouse_sources/backend/temporal/data_imports/sources/bettermode/canonical_descriptions.pyindex 01387b64b620..eeed4497b6c6 100644--- a/products/warehouse_sources/backend/temporal/data_imports/sources/bettermode/canonical_descriptions.py+++ b/products/warehouse_sources/backend/temporal/data_imports/sources/bettermode/canonical_descriptions.py@@ -207,4 +207,22 @@ CANONICAL_DESCRIPTIONS: CanonicalDescriptions = {"updatedAt": "Timestamp when the item was last updated.",},},+ "member_invitations": {+ "description": "Invitations sent to join the community, with their delivery and acceptance status.",+ "docs_url": "https://developers.bettermode.com/docs/graphql/objects/member-invitation/",+ "columns": {+ "id": "Unique identifier of the invitation.",+ "networkId": "ID of the community (network) the invitation is for.",+ "inviteeEmail": "Email address the invitation was sent to.",+ "inviteeName": "Name given for the invited person, if any.",+ "inviteeId": "ID of the member created from the invitation, once it is accepted.",+ "inviterId": "ID of the member who sent the invitation.",+ "roleId": "ID of the network role the invitee gets on joining.",+ "status": "Invitation status, e.g. sent, delivered, accepted, Expired, or Revoked.",+ "invitationMessage": "Custom message included with the invitation.",+ "createdAt": "Timestamp when the invitation was created.",+ "expiresAt": "Timestamp when the invitation expires.",+ "joinedAt": "Timestamp when the invitee joined the community, if they did.",+ },+ },}diff --git a/products/warehouse_sources/backend/temporal/data_imports/sources/bettermode/settings.py b/products/warehouse_sources/backend/temporal/data_imports/sources/bettermode/settings.pyindex 405edb0a242d..ef6491289872 100644--- a/products/warehouse_sources/backend/temporal/data_imports/sources/bettermode/settings.py+++ b/products/warehouse_sources/backend/temporal/data_imports/sources/bettermode/settings.py@@ -209,6 +209,21 @@ createdAtupdatedAt"""+_MEMBER_INVITATION_NODE_FIELDS = """+id+networkId+inviteeEmail+inviteeName+inviteeId+inviterId+roleId+status+invitationMessage+createdAt+expiresAt+joinedAt+"""+@dataclass(frozen=True)class BettermodeEndpointConfig:@@ -330,6 +345,11 @@ BETTERMODE_ENDPOINTS: dict[str, BettermodeEndpointConfig] = {partition_key=None,is_list=True,),+ "member_invitations": BettermodeEndpointConfig(+ query_field="memberInvitations",+ node_fields=_MEMBER_INVITATION_NODE_FIELDS,+ page_size=100,+ ),}ENDPOINTS = tuple(BETTERMODE_ENDPOINTS.keys())