Skip to content

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

Open
psaikaushik wants to merge 2 commits intoMarquezProject:mainfrom
psaikaushik:feat/1461-add-nodeId-to-api-models-v2
Open

feat: add nodeId to Dataset, DatasetVersion, and Job API response models#3105
psaikaushik wants to merge 2 commits intoMarquezProject:mainfrom
psaikaushik:feat/1461-add-nodeId-to-api-models-v2

Conversation

@psaikaushik
Copy link
Copy Markdown

@psaikaushik psaikaushik commented Apr 15, 2026

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

  • Follows existing patterns
  • Includes tests
  • DCO sign-off included

Add computed getNodeId() methods to Dataset, DatasetVersion, and Job
service models. This allows API consumers to directly use the nodeId
to query the Lineage API without having to manually construct it.

- Dataset: returns "dataset:namespace:name"
- DatasetVersion: returns "dataset:namespace:name#version"
- Job: returns "job:namespace:name"

The nodeId is computed from existing fields via NodeId.of(), so no
database changes are needed.

Closes MarquezProject#1461

Signed-off-by: Sai Kaushik Ponnekanti <psaikaushik@gmail.com>
DbTable's constructor takes 14 parameters. The test was passing 15
by including an extra null for columnLineage, which is handled
internally by DbTable when calling super().

Also removed unused import java.net.URL.

Signed-off-by: Sai Kaushik Ponnekanti <psaikaushik@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

api API layer changes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add nodeId to API models

1 participant