feat(dv): records matching and reporting PTransforms#3440
feat(dv): records matching and reporting PTransforms#3440manitgupta wants to merge 2 commits intomainfrom
Conversation
Summary of ChangesHello, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed! This pull request integrates essential data validation capabilities by introducing two new Apache Beam PTransforms. The first transform efficiently matches records between a source and a destination, identifying discrepancies. The second transform then systematically reports these validation outcomes, including detailed mismatches and aggregated statistics, to BigQuery for further analysis and monitoring. Highlights
Changelog
Activity
Using Gemini Code AssistThe full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips. Invoking Gemini You can request assistance from Gemini at any point by creating a comment using either
Customization To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a Limitations & Feedback Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here. You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension. Footnotes
|
...-spanner-dv/src/main/java/com/google/cloud/teleport/v2/transforms/MatchRecordsTransform.java
Show resolved
Hide resolved
bharadwaj-aditya
left a comment
There was a problem hiding this comment.
Seems fine overall. Couple of questions.
If they don't seem major, please go ahead and merge.
...spanner-dv/src/main/java/com/google/cloud/teleport/v2/transforms/ReportResultsTransform.java
Outdated
Show resolved
Hide resolved
...spanner-dv/src/main/java/com/google/cloud/teleport/v2/transforms/ReportResultsTransform.java
Show resolved
Hide resolved
The base branch was changed.
6ec9597 to
c034db1
Compare
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #3440 +/- ##
============================================
+ Coverage 51.93% 57.90% +5.96%
+ Complexity 5457 1887 -3570
============================================
Files 1018 485 -533
Lines 61845 27829 -34016
Branches 6813 3011 -3802
============================================
- Hits 32120 16113 -16007
+ Misses 27498 10756 -16742
+ Partials 2227 960 -1267
🚀 New features to boost your workflow:
|
TL;DR
Added two new composite PTransform classes for the GCS-Spanner data validation pipeline: MatchRecordsTransform for comparing records from source and Spanner to identify mismatches, and ReportResultsTransform for generating table-level validation statistics and surfacing mismatched records.
What changed?
Added unit tests for both PTransform classes to ensure the matching logic and aggregation pipelines are wired correctly.
How to test?
Run the new unit tests:
Why make this change?
These PTransform classes encapsulate the core business logic of the validation tool. By separating the matching (MatchRecordsTransform) from the aggregation and reporting (ReportResultsTransform), the pipeline maintains clear boundaries. This modularity makes it easier to independently scale the memory-intensive matching phase and the subsequent reporting phase. This PR builds upon the ingestion transforms introduced in dv-6a-readers.