Skip to content

Commit 58c802b

Browse files
committed
[DOP-25645] insert license
1 parent 42e95da commit 58c802b

5 files changed

Lines changed: 14 additions & 2 deletions

File tree

data_rentgen/consumer/extractors/batch_extraction_result.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ def __init__(self):
6868
self._outputs: dict[tuple, OutputDTO] = {}
6969
self._column_lineage: dict[tuple, ColumnLineageDTO] = {}
7070
self._schemas: dict[tuple, SchemaDTO] = {}
71-
self._sql_queries: dict[str, SQLQueryDTO] = {}
71+
self._sql_queries: dict[tuple, SQLQueryDTO] = {}
7272
self._users: dict[tuple, UserDTO] = {}
7373

7474
def __repr__(self):
@@ -173,7 +173,7 @@ def get_location(self, location_key: tuple) -> LocationDTO:
173173
def get_schema(self, schema_key: tuple) -> SchemaDTO:
174174
return self._schemas[schema_key]
175175

176-
def get_sql_query(self, sql_query_key: str) -> SQLQueryDTO:
176+
def get_sql_query(self, sql_query_key: tuple) -> SQLQueryDTO:
177177
return self._sql_queries[sql_query_key]
178178

179179
def get_user(self, user_key: tuple) -> UserDTO:

data_rentgen/consumer/openlineage/job_facets/sql.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
# SPDX-FileCopyrightText: 2024-2025 MTS PJSC
2+
# SPDX-License-Identifier: Apache-2.0
13
from data_rentgen.consumer.openlineage.job_facets.base import OpenLineageJobFacet
24

35

data_rentgen/db/models/sql_query.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
# SPDX-FileCopyrightText: 2024-2025 MTS PJSC
2+
# SPDX-License-Identifier: Apache-2.0
13
from uuid import UUID
24

35
from sqlalchemy import UUID as SQL_UUID

data_rentgen/db/repositories/sql_query.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
# SPDX-FileCopyrightText: 2024-2025 MTS PJSC
2+
# SPDX-License-Identifier: Apache-2.0
13
from uuid import UUID
24

35
from sqlalchemy import select

data_rentgen/dto/sql_query.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
# SPDX-FileCopyrightText: 2024-2025 MTS PJSC
2+
# SPDX-License-Identifier: Apache-2.0
13
from __future__ import annotations
24

35
from dataclasses import dataclass, field
@@ -8,6 +10,10 @@ class SQLQueryDTO:
810
query: str
911
id: int | None = field(default=None, compare=False)
1012

13+
@property
14+
def unique_key(self) -> tuple:
15+
return (self.query,)
16+
1117
def merge(self, new: SQLQueryDTO) -> SQLQueryDTO:
1218
if new.id is None:
1319
return self

0 commit comments

Comments
 (0)