From ead5ce7227bc77f57a59c8520b514fb68e09883b Mon Sep 17 00:00:00 2001 From: NiharDoshi99 <51595473+NiharDoshi99@users.noreply.github.com> Date: Thu, 1 Dec 2022 18:43:11 +0530 Subject: [PATCH] Fix: dagster keyerror solved (#9099) --- ingestion/src/metadata/ingestion/source/pipeline/dagster.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ingestion/src/metadata/ingestion/source/pipeline/dagster.py b/ingestion/src/metadata/ingestion/source/pipeline/dagster.py index 1a54ad9184b..61dd2f61141 100644 --- a/ingestion/src/metadata/ingestion/source/pipeline/dagster.py +++ b/ingestion/src/metadata/ingestion/source/pipeline/dagster.py @@ -212,7 +212,7 @@ class DagsterSource(PipelineServiceSource): runs = self.get_task_runs( task.name, pipeline_name=pipeline_details.get("name") ) - for run in runs["solidHandle"]["stepStats"]["nodes"]: + for run in runs["solidHandle"]["stepStats"].get("nodes") or []: task_status = TaskStatus( name=task.name, executionStatus=STATUS_MAP.get( @@ -247,7 +247,7 @@ class DagsterSource(PipelineServiceSource): for result in results: self.context.repository_location = result.get("location")["name"] self.context.repository_name = result["name"] - for job in result["pipelines"]: + for job in result.get("pipelines") or []: yield job def get_pipeline_name(self, pipeline_details) -> str: