Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Runless events - consume dataset event #2641

Merged
merged 7 commits into from
Nov 6, 2023
Merged

Conversation

pawel-big-lebowski
Copy link
Collaborator

Problem

Part of the #2624 to support DatasetEvent.

Closes: #2624

Solution

Please describe your change as it relates to the problem, or bug fix, as well as any dependencies. If your change requires a database schema migration, please describe the schema modification(s) and whether it's a backwards-incompatible or backwards-compatible change.

Note: All database schema changes require discussion. Please link the issue for context.

One-line summary:

Checklist

  • You've signed-off your work
  • Your changes are accompanied by tests (if relevant)
  • Your change contains a small diff and is self-contained
  • You've updated any relevant documentation (if relevant)
  • You've included a one-line summary of your change for the CHANGELOG.md (Depending on the change, this may not be necessary).
  • You've versioned your .sql database schema migration according to Flyway's naming convention (if relevant)
  • You've included a header in any source code files (if relevant)

@boring-cyborg boring-cyborg bot added api API layer changes docs labels Oct 6, 2023
@netlify
Copy link

netlify bot commented Oct 6, 2023

Deploy Preview for peppy-sprite-186812 ready!

Name Link
🔨 Latest commit f4bbf16
🔍 Latest deploy log https://app.netlify.com/sites/peppy-sprite-186812/deploys/6548906b26a9c60008425c79
😎 Deploy Preview https://deploy-preview-2641--peppy-sprite-186812.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

@codecov
Copy link

codecov bot commented Oct 6, 2023

Codecov Report

Merging #2641 (5587fb2) into main (7c19162) will increase coverage by 0.25%.
The diff coverage is 97.84%.

❗ Current head 5587fb2 differs from pull request most recent head f4bbf16. Consider uploading reports for the commit f4bbf16 to get more accurate results

@@             Coverage Diff              @@
##               main    #2641      +/-   ##
============================================
+ Coverage     83.35%   83.60%   +0.25%     
- Complexity     1295     1334      +39     
============================================
  Files           244      245       +1     
  Lines          5948     6076     +128     
  Branches        279      280       +1     
============================================
+ Hits           4958     5080     +122     
  Misses          844      844              
- Partials        146      152       +6     
Files Coverage Δ
...src/main/java/marquez/api/OpenLineageResource.java 91.66% <100.00%> (+1.04%) ⬆️
api/src/main/java/marquez/db/DatasetFacetsDao.java 100.00% <ø> (ø)
api/src/main/java/marquez/db/OpenLineageDao.java 96.58% <100.00%> (+0.16%) ⬆️
api/src/main/java/marquez/db/RunDao.java 94.49% <100.00%> (+2.09%) ⬆️
.../main/java/marquez/service/OpenLineageService.java 92.30% <100.00%> (+1.13%) ⬆️
api/src/main/java/marquez/db/models/ModelDaos.java 89.83% <89.83%> (ø)

📣 Codecov offers a browser extension for seamless coverage viewing on GitHub. Try it in Chrome or Firefox today!

@pawel-big-lebowski pawel-big-lebowski marked this pull request as ready for review October 6, 2023 11:54
@pawel-big-lebowski pawel-big-lebowski force-pushed the static/dataset-event branch 3 times, most recently from bf33c31 to 2213b35 Compare October 24, 2023 12:22
Signed-off-by: Pawel Leszczynski <leszczynski.pawel@gmail.com>
Signed-off-by: Pawel Leszczynski <leszczynski.pawel@gmail.com>
Signed-off-by: Pawel Leszczynski <leszczynski.pawel@gmail.com>
Signed-off-by: Pawel Leszczynski <leszczynski.pawel@gmail.com>
Copy link
Member

@julienledem julienledem left a comment

Choose a reason for hiding this comment

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

I left some comments/questions but otherwise, this looks good.
I like the multiple commits. That made it so much easier to review.

api/src/main/java/marquez/api/OpenLineageResource.java Outdated Show resolved Hide resolved
null,
facets));

// OutputFacets ...
Copy link
Member

Choose a reason for hiding this comment

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

Do we not have InputFacets as well in this case?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Neither inputFacet nor outputFacets should be allowed for DatasetEvent.
We should have 3 methods: insertDatasetFacets, insertInputDatasetFacets and insertOutputDatasetFacets.
I fixed this in the 5th commit.

Copy link
Member

Choose a reason for hiding this comment

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

Ahh yes thanks for clarifying; was thinking about just this during my review 👀

Signed-off-by: Pawel Leszczynski <leszczynski.pawel@gmail.com>
@julienledem
Copy link
Member

Thanks for the update!
@wslulciuc : did you have anymore comments?

ColumnLineageDao columnLineageDao = createColumnLineageDao();
RunFacetsDao runFacetsDao = createRunFacetsDao();
default UpdateLineageRow updateMarquezModel(DatasetEvent event, ObjectMapper mapper) {
daos.initBaseDao(this);
Copy link
Member

Choose a reason for hiding this comment

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

This is pretty cool! I agree a wrapper class like ModelDaos helps with readability and minimizes DAO boilerplate initialization code. We can probably take the refactoring further an ask ourselves if we really need all of this logic in the DAO layer? Anyways, great to see cleanup efforts in this part of the codebase! 💯

Signed-off-by: Pawel Leszczynski <leszczynski.pawel@gmail.com>
Copy link
Member

@wslulciuc wslulciuc left a comment

Choose a reason for hiding this comment

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

💯 💯 💯

@wslulciuc wslulciuc enabled auto-merge (squash) November 6, 2023 07:06
@wslulciuc wslulciuc merged commit 42cadbb into main Nov 6, 2023
15 checks passed
@wslulciuc wslulciuc deleted the static/dataset-event branch November 6, 2023 07:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
api API layer changes docs
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

Static Lineage Support in Marquez using OpenLineage
3 participants