feat: add optional creator_email, updater_email, team_name to Metric Sync API payload#16
Open
bertilhatt wants to merge 1 commit intomainfrom
Open
feat: add optional creator_email, updater_email, team_name to Metric Sync API payload#16bertilhatt wants to merge 1 commit intomainfrom
bertilhatt wants to merge 1 commit intomainfrom
Conversation
…Sync API payload - Sync-level: optional creator_email, updater_email, team_name in request body - Per-metric: override via meta (eppo_creator_email, eppo_updater_email, eppo_team_name) - CLI: --creator-email, --updater-email, --team-name; config from dbt_project.yml (eppo_sync) - Schema: document new optional fields at sync and metric level - Tests: mapper and run_sync coverage for new fields Resolves: FFESUPPORT-407 Depends on: Eppo-exp/eppo#13697 (Metric Sync API augmentation) Made-with: Cursor
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.
Summary
Adds support for the new optional Metric Sync API fields: creator_email, updater_email, and team_name at both sync-level and per-metric level. Sync-level values apply as defaults to all metrics; individual metrics can override via dbt
metakeys.Resolves: FFESUPPORT-407
Dependency: This work depends on the Metric Sync API changes in Eppo-exp/eppo — PR #13697. That PR augments the API to accept these optional body fields and defines semantics (omit = clear, lookup failure = clear, per-metric overrides). This PR updates dbt-eppo-sync to send the new fields when configured.
Changes
1. Mapper (
mapper.py)map_dbt_to_eppo_sync_payload()now accepts optionalcreator_email,updater_email, andteam_name. When provided, they are included in the top-level request body next tosync_tag,fact_sources, andmetrics. When omitted, the keys are not sent (API treats omit as clear).meta:eppo_creator_email→creator_emaileppo_updater_email→updater_emaileppo_team_name→team_nameOnly metrics that define these in
metaget the corresponding keys on their object; others rely on sync-level defaults on the API side.2. Sync orchestration (
sync.py)run_sync()accepts optionalcreator_email,updater_email, andteam_nameand passes them through to the mapper.3. CLI (
cli.py)--creator-email,--updater-email,--team-name.dbt_project.yml:eppo_sync, orvars.eppo_syncSupported keys:
creator_email,updater_email,team_name. CLI options override config file values when both are set.4. Schema (
eppo_metric_schema.json)creator_email,updater_email,team_name(with descriptions and format/length constraints).metrics.items: same three as optional per-metric properties.5. Tests
test_map_sync_level_creator_updater_team,test_map_sync_level_omit_optional_metadata,test_map_per_metric_override_creator_team.test_run_sync_passes_creator_updater_team_to_mapper, and assertions intest_run_sync_successful_livethat mapper is called with the new params (asNonewhen not provided).Usage
CLI (overrides config):
Config in
dbt_project.yml:Per-metric override in dbt metric YAML:
Checklist