feat(controlplane): serve persons_distinct_ids_table in discovery payload - #1026
Draft
fuziontech wants to merge 1 commit into
Draft
feat(controlplane): serve persons_distinct_ids_table in discovery payload#1026fuziontech wants to merge 1 commit into
fuziontech wants to merge 1 commit into
Conversation
…load Streamed persons replication (millpond -> shared DuckLake changelog -> viaduck full_cdc fanout) lands two tables per team in the duckling: the persons table and its distinct-id mapping table. Destination discovery already resolves events_table/persons_table; add the distinct-ids location, derived once in resolveTeamTables from the resolved persons name (persons_ab12 -> persons_distinct_ids_ab12), so a viaduck persons pipeline never re-derives the suffix rule itself. Wire-compatible: additive field on the existing team payload. Co-authored-by: Shelley <shelley@exe.dev>
Test Impact PlanDeterministic summary of how this PR changes tests, CI runners, and coverage-risk signals. Summary
Signals
Coverage risk: neutral or increased No coverage-reduction warnings detected. |
1 task
Member
Author
|
Downstream consumer of this field: PostHog/posthog#76997 (duckling persons streaming schema prep + cutover runbook) derives the same name with |
Member
Author
|
Full PR map for the persons streaming migration:
Note: the millpond side needs nothing — its |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Adds
persons_distinct_ids_tableto the per-team payload served byGET /api/v1/warehouses(destination discovery for external writers).Why
Streamed persons replication (millpond → shared DuckLake changelog → viaduck
full_cdcfanout) lands two tables per team in the duckling: the persons table and its distinct-id mapping table (the join side of today's denormalized batch export). Discovery already resolvesevents_table/persons_table; the distinct-ids location belongs in the same single derivation site so a viaduck persons pipeline never re-derives the suffix rule itself.Derivation rule
resolveTeamTablesnow also returns<schema_name>.+ the resolved persons name with itspersonsprefix replaced bypersons_distinct_ids:persons→persons_distinct_idspersons_ab12(suffixed override) →persons_distinct_ids_ab12personsprefix →<name>_distinct_idsNo new configstore column: this table has no legacy/grandfathered shape, so convention-only derivation is sufficient.
Compatibility
Additive field on the existing team payload — wire-compatible per the discovery module's own contract (adding a field is safe, removing one is not).
Tests
TestResolvedTableNamesextended to assert the default derivationTestResolvedDistinctIDsTableFollowsPersonsSuffixfor the suffixed-override casego test ./controlplane/...green;golangci-lint runclean🤖 Prepared by an agent as part of the persons-backfill → millpond/viaduck streaming migration.