diff --git a/airflow/dags/EOSC_entity_trasform.py b/airflow/dags/EOSC_entity_trasform.py index a35f4ad..cef71fc 100644 --- a/airflow/dags/EOSC_entity_trasform.py +++ b/airflow/dags/EOSC_entity_trasform.py @@ -115,18 +115,23 @@ def isEmpty(current_value: Dict[str, Any], labels: List[str]) -> bool: # def filter_product(p: dict) -> bool: if isEmpty(p, ["titles", "none"]): + print("missing title") return True if isEmpty(p, ["firstPublishDate"]): + print("missing date") return True if p['product_type'] == "literature": if isEmpty(p, ["abstracts", "none"]): + print("missing abstracts") return True if isEmpty(p, ["contributions", "person", "local_identifier"]): + print("missing creators") return True elif p['product_type'] in ["research data", "other"]: if isEmpty(p, ["contributions", "person", "local_identifier"]): + print("missing creators") return True return False @@ -135,3 +140,5 @@ def filter_product(p: dict) -> bool: filter_entities = { "products": filter_product } + +