marquez icon indicating copy to clipboard operation
marquez copied to clipboard

feat: add `nodeId` to Dataset, DatasetVersion, and Job API response models

Open psaikaushik opened this issue 7 months ago • 0 comments

Summary

Adds a computed nodeId field to the Dataset, DatasetVersion, and Job API response models. This allows API consumers to directly use the nodeId to query the Lineage API without having to manually construct it.

Supersedes #3102 (recreated to fix DCO sign-off).

Closes #1461

Changes

Dataset.java

Added getNodeId() method that returns NodeId.of(id), producing:

dataset:<namespace>:<name>

DatasetVersion.java

Added getNodeId() method that returns a version-qualified nodeId:

dataset:<namespace>:<name>#<version>

Job.java

Added getNodeId() method that returns NodeId.of(id), producing:

job:<namespace>:<name>

Design Decisions

  • Computed, not stored: nodeId is derived from existing fields via getNodeId(), so no database changes are needed.
  • Reuses NodeId class: Leverages the existing NodeId.of() factory methods.

Tests

Added NodeIdOnModelsTest.java with tests for all three models.

Checklist

  • [x] Follows existing patterns
  • [x] Includes tests
  • [x] DCO sign-off included

psaikaushik avatar Apr 15 '26 05:04 psaikaushik