Skip to content

Commit 0889c82

Browse files
committed
Merge branch 'm-kovalsky/issue259'
2 parents e140e96 + 134204a commit 0889c82

File tree

3 files changed

+248
-202
lines changed

3 files changed

+248
-202
lines changed

src/sempy_labs/_helper_functions.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1144,7 +1144,7 @@ def _get_max_run_id(lakehouse: str, table_name: str) -> int:
11441144
spark = SparkSession.builder.getOrCreate()
11451145
query = f"SELECT MAX(RunId) FROM {lakehouse}.{table_name}"
11461146
dfSpark = spark.sql(query)
1147-
max_run_id = dfSpark.collect()[0][0]
1147+
max_run_id = dfSpark.collect()[0][0] or 0
11481148

11491149
return max_run_id
11501150

0 commit comments

Comments
 (0)