From 2b665438b7d799625092447e0c6d2a135f16bda8 Mon Sep 17 00:00:00 2001 From: Marijn Valk Date: Wed, 7 Dec 2022 14:11:17 +0100 Subject: [PATCH] confirm sparksession exists before checking conf --- dlt_with_debug/v2.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dlt_with_debug/v2.py b/dlt_with_debug/v2.py index de6117f..fbaa93a 100644 --- a/dlt_with_debug/v2.py +++ b/dlt_with_debug/v2.py @@ -5,7 +5,7 @@ from pyspark.sql import SparkSession spark = SparkSession.getActiveSession() -pipeline_id = spark.conf.get("pipelines.id", None) +pipeline_id = spark.conf.get("pipelines.id", None) if spark else None def dltwithdebug(g_ns):