Skip to content

Add experiment_id to variant monitoring mart table#225

Merged
qclayssen merged 1 commit intomainfrom
224-add-experiment-id-in-variant-monitoring-mart
May 7, 2026
Merged

Add experiment_id to variant monitoring mart table#225
qclayssen merged 1 commit intomainfrom
224-add-experiment-id-in-variant-monitoring-mart

Conversation

@qclayssen
Copy link
Copy Markdown
Contributor

@qclayssen qclayssen commented May 6, 2026

Summary

  • Adds experiment_id column to mart.variant_monitoring_result
  • Joins via effsat_library_experiment (effectivity satellite, is_current = 1) → hub_experiment, following the same pattern used in mart.lims
  • Uses LEFT JOIN so rows without a matching experiment are preserved
  • Adds btree index on experiment_id

Test plan

  • dbt compile --select variant_monitoring_result — compiles cleanly
  • dbt run --select variant_monitoring_result against local dev DB — SELECT 10, no errors

@qclayssen qclayssen linked an issue May 6, 2026 that may be closed by this pull request
@qclayssen qclayssen requested a review from victorskl May 6, 2026 23:39
@victorskl victorskl added the enhancement New feature or request label May 6, 2026
@victorskl
Copy link
Copy Markdown
Member

against local dev DB — SELECT 10, no errors

Hey, I have updated to add one more data points to dev data. Try make sync to grab the latest to see it! Just so you know.

I will review PR in tick.

@qclayssen
Copy link
Copy Markdown
Contributor Author

Ran make sync + full dbt run. The model works fine for the existing fixture data, but the new run you added (2026050105f20437 / L2600258) causes an FK error because the ODS linkage is missing.

The PSA event row was added but orcavault_ods_workflow_manager_libraryassociation.csv has no entry linking L2600258 to that portal run — so link_library_workflow_run never generates the required hash key, and sat_variant_monitoring_result fails with a foreign key violation.

Could you add the matching row to workflow_manager_libraryassociation (and workflow_manager_library if needed) in the fixture data?

@victorskl
Copy link
Copy Markdown
Member

victorskl commented May 7, 2026

The data point is there, ya know.
Can you double check?

make sync
make down
make up
make all
make load

dbt clean
dbt deps
dbt seed
dbt run

It works well at my end. For this PR changes, too. :)

Copy link
Copy Markdown
Member

@victorskl victorskl left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@qclayssen
Copy link
Copy Markdown
Contributor Author

It works well at my end. For this PR changes, too. :)

I did have to rerun everything indeed ! it work

@qclayssen qclayssen added this pull request to the merge queue May 7, 2026
Merged via the queue into main with commit f389fba May 7, 2026
6 checks passed
@qclayssen qclayssen deleted the 224-add-experiment-id-in-variant-monitoring-mart branch May 7, 2026 05:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add experiment id in variant monitoring mart

2 participants