Skip to content

fix(ingest/snowplow): use non-deprecated pipelines/v1 enrichments endpoint#17721

Open
treff7es wants to merge 6 commits into
masterfrom
feature/ing-2411
Open

fix(ingest/snowplow): use non-deprecated pipelines/v1 enrichments endpoint#17721
treff7es wants to merge 6 commits into
masterfrom
feature/ing-2411

Conversation

@treff7es
Copy link
Copy Markdown
Contributor

@treff7es treff7es commented Jun 3, 2026

Summary

The Snowplow connector fetched pipeline enrichments from the BDP Console API endpoint GET organizations/{org}/resources/v1/pipelines/{pipelineId}/configuration/enrichments, which Snowplow has deprecated (confirmed via deprecated: true in their OpenAPI spec). This switches to the supported endpoint GET organizations/{org}/pipelines/v1/{pipelineId}/enrichments — the same pipelines/v1 namespace already used by get_pipeline().

Details

The replacement endpoint returns a different payload shape (EnrichmentResource: name/enabled/schemaKey/userData) instead of the legacy EnrichmentDefinitionResource (id/filename/content/lastUpdate). To keep all downstream lineage/PII logic and existing tests unchanged, the new payload is adapted into the internal model via a new Enrichment.from_resource() anti-corruption mapping:

  • userData is the enrichment parameter object directly (e.g. {"geo": {...}}, {"pii": [...], "strategy": {...}}) — it is not wrapped in a parameters key. This matches the deprecated endpoint's content.data.parameters exactly.
  • vendor is derived from the Iglu schemaKey (iglu:<vendor>/<name>/...), since the new payload no longer returns it.
  • The new payload has no per-enrichment UUID, so enrichment DataJob URNs are now derived from the enrichment name instead of the UUID.

Breaking change

Enrichment DataJob URNs change from UUID-based (...,07409eac-...)) to name-based (...,campaign-attribution)). Existing enrichment DataJobs ingested under the old URNs will be orphaned and re-created under the new name-based URNs on the next run. No recipe changes required. Documented in docs/how/updating-datahub.md.

Testing

  • Updated unit tests (test_snowplow_client.py, test_snowplow_client_extended.py) and the integration fixture + golden file to the new shape.
  • Full Snowplow unit + integration suite passes (668 tests).
  • Validated end-to-end against the live BDP Console API: authenticated, listed pipelines, and ran a full file-sink ingestion (0 failures, 0 warnings). The new endpoint returns a superset of the deprecated one (19 vs 17 enrichments), and all enrichment parameters — including PII field configuration used for lineage — are correctly captured.

Checklist

  • PR conforms to the Contributing Guideline (PR Title Format)
  • Tests for the changes have been added/updated
  • Docs updated (breaking change entry in updating-datahub.md)

…point

Snowplow deprecated the resources/v1/.../configuration/enrichments endpoint.
Switch get_enrichments() to GET pipelines/v1/{pipelineId}/enrichments and adapt
the new EnrichmentResource payload (name/enabled/schemaKey/userData) into the
internal model via Enrichment.from_resource(). userData is the parameter object
itself (not wrapped in a "parameters" key); vendor is derived from the Iglu
schemaKey since the new payload no longer returns it.

Because the new payload has no per-enrichment UUID, enrichment DataJob URNs are
now derived from the enrichment name instead of the UUID (breaking change noted
in updating-datahub.md). Validated end-to-end against the live BDP Console API.
@github-actions github-actions Bot added ingestion PR or Issue related to the ingestion of metadata docs Issues and Improvements to docs labels Jun 3, 2026
treff7es added 4 commits June 3, 2026 23:04
Updated the documentation to reflect changes in the datahub-prefect package requirements, removal of the chart_pattern config field, legacy Docker Compose files, and Docker image tagging strategy.
@codecov
Copy link
Copy Markdown

codecov Bot commented Jun 3, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ All tests successful. No failed tests found.

📢 Thoughts on this report? Let us know!

@maggiehays maggiehays added the needs-review Label for PRs that need review from a maintainer. label Jun 4, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

docs Issues and Improvements to docs ingestion PR or Issue related to the ingestion of metadata needs-review Label for PRs that need review from a maintainer.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants