From aeaa79d0f99bc5b9eea84edf40efc20960f1dfd5 Mon Sep 17 00:00:00 2001 From: Allison Suarez Miranda Date: Tue, 23 Feb 2021 10:28:07 -0800 Subject: [PATCH] small change to lineage schema Signed-off-by: Allison Suarez Miranda --- amundsen_common/models/lineage.py | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/amundsen_common/models/lineage.py b/amundsen_common/models/lineage.py index 6646112..823eab0 100644 --- a/amundsen_common/models/lineage.py +++ b/amundsen_common/models/lineage.py @@ -14,8 +14,8 @@ class LineageItem: key: str # down/upstream table/col/task key level: int # upstream/downstream distance from current resource source: str # database this resource is from - badges: Optional[List[Badge]] - usage: Optional[int] # statistic to sort lineage items by + badges: Optional[List[Badge]] = None + usage: Optional[int] = None # statistic to sort lineage items by class LineageItemSchema(AttrsSchema): @@ -26,9 +26,11 @@ class LineageItemSchema(AttrsSchema): @attr.s(auto_attribs=True, kw_only=True) class Lineage: key: str # current table/col/task key - direction: str # upstream/downstream + direction: str # upstream/downstream/both depth: int # how many levels up/down 0 == all - lineage_entities: List[LineageItem] # list of up/downstream entities + lineage_entities_upstream: List[LineageItem] # list of upstream entities + lineage_entities_downstream: List[LineageItem] # list of downstream entities + class LineageSchema(AttrsSchema):