Skip to content
This repository has been archived by the owner on Nov 6, 2023. It is now read-only.

Commit

Permalink
fix(postgres): schema name (#230)
Browse files Browse the repository at this point in the history
  • Loading branch information
Vixtir authored Oct 2, 2023
1 parent 4d5e064 commit 6e6fc1f
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions odd_collector/adapters/postgresql/mappers/schemas.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
from funcy import lpluck_attr
from odd_collector_sdk.utils.metadata import extract_metadata, DefinitionType
from odd_collector_sdk.utils.metadata import DefinitionType, extract_metadata
from odd_models import DataEntity, DataEntityGroup, DataEntityType
from oddrn_generator import PostgresqlGenerator

Expand All @@ -10,9 +10,10 @@ def map_schema(
generator: PostgresqlGenerator, schema: Schema, table_entities: list[DataEntity]
) -> DataEntity:
return DataEntity(
oddrn=generator.get_oddrn_by_path("schemas"),
oddrn=generator.get_oddrn_by_path("schemas", schema.schema_name),
name=schema.schema_name,
type=DataEntityType.DATABASE_SERVICE,
owner=None,
metadata=[extract_metadata("postgres", schema, DefinitionType.DATASET)],
data_entity_group=DataEntityGroup(
entities_list=lpluck_attr("oddrn", table_entities)
Expand Down

0 comments on commit 6e6fc1f

Please sign in to comment.