Skip to content

Commit d7175b3

Browse files
committed
[DOP-23921] Include sum inputs & outputs to lineage response
1 parent 7cb680c commit d7175b3

File tree

11 files changed

+655
-181
lines changed

11 files changed

+655
-181
lines changed

data_rentgen/db/repositories/input.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,7 @@ async def create_or_update_bulk(self, inputs: list[InputDTO]) -> list[Input]:
7070
async def list_by_operation_ids(
7171
self,
7272
operation_ids: Sequence[UUID],
73+
granularity: Literal["JOB", "RUN", "OPERATION"],
7374
) -> list[Input]:
7475
if not operation_ids:
7576
return []
@@ -85,14 +86,14 @@ async def list_by_operation_ids(
8586
Input.operation_id == any_(operation_ids), # type: ignore[arg-type]
8687
]
8788

88-
return await self._get_inputs(where, "OPERATION")
89+
return await self._get_inputs(where, granularity)
8990

9091
async def list_by_run_ids(
9192
self,
9293
run_ids: Sequence[UUID],
9394
since: datetime,
9495
until: datetime | None,
95-
granularity: Literal["RUN", "OPERATION"],
96+
granularity: Literal["JOB", "RUN", "OPERATION"],
9697
) -> list[Input]:
9798
if not run_ids:
9899
return []

data_rentgen/db/repositories/output.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,7 @@ async def create_or_update_bulk(self, outputs: list[OutputDTO]) -> list[Output]:
7171
async def list_by_operation_ids(
7272
self,
7373
operation_ids: Sequence[UUID],
74+
granularity: Literal["JOB", "RUN", "OPERATION"],
7475
) -> list[Output]:
7576
if not operation_ids:
7677
return []
@@ -86,14 +87,14 @@ async def list_by_operation_ids(
8687
Output.operation_id == any_(operation_ids), # type: ignore[arg-type]
8788
]
8889

89-
return await self._get_outputs(where, "OPERATION")
90+
return await self._get_outputs(where, granularity)
9091

9192
async def list_by_run_ids(
9293
self,
9394
run_ids: Sequence[UUID],
9495
since: datetime,
9596
until: datetime | None,
96-
granularity: Literal["RUN", "OPERATION"],
97+
granularity: Literal["JOB", "RUN", "OPERATION"],
9798
) -> list[Output]:
9899
if not run_ids:
99100
return []

0 commit comments

Comments
 (0)