Skip to content

Commit

Permalink
move to StrEnum class
Browse files Browse the repository at this point in the history
  • Loading branch information
shirshanka committed Sep 29, 2024
1 parent 3a2d62f commit b78db48
Showing 1 changed file with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
from datahub.emitter.mce_builder import make_schema_field_urn
from datahub.ingestion.graph.client import DataHubGraph, SearchFilterRule
from datahub.metadata.schema_classes import MetadataAttributionClass
from datahub.utilities.str_enum import StrEnum
from datahub.utilities.urns.urn import Urn, guess_entity_type
from pydantic import validator
from pydantic.fields import Field
Expand All @@ -35,13 +36,13 @@
SYSTEM_ACTOR = "urn:li:corpuser:__datahub_system"


class RelationshipType(str, Enum):
class RelationshipType(StrEnum):
LINEAGE = "lineage" # signifies all types of lineage
HIERARCHY = "hierarchy" # signifies all types of hierarchy
SIBLING = "sibling" # signifies all types of sibling


class DirectionType(str, Enum):
class DirectionType(StrEnum):
UP = "up" # signifies upstream or parent (depending on relationship type)
DOWN = "down" # signifies downstream or child (depending on relationship type)
ALL = "all" # signifies all directions
Expand Down

0 comments on commit b78db48

Please sign in to comment.