Skip to content

Commit

Permalink
Fixed DBR version constant
Browse files Browse the repository at this point in the history
Signed-off-by: Miguel Rodriguez Gutierrez <[email protected]>
  • Loading branch information
MigQ2 committed Oct 1, 2024
1 parent 38d8042 commit 8a1a704
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion kedro-datasets/kedro_datasets/spark/spark_dataset.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,9 +38,11 @@ def _get_spark() -> Any:
extended configuration mechanisms and notebook compatibility,
otherwise we use classic pyspark.
"""
MIN_DBCONNECT_V2_VERSION = 13
if (
"DATABRICKS_RUNTIME_VERSION" in os.environ
and int(os.environ["DATABRICKS_RUNTIME_VERSION"].split(".")[0]) >= 13
and int(os.environ["DATABRICKS_RUNTIME_VERSION"].split(".")[0])
>= MIN_DBCONNECT_V2_VERSION
):
# When using databricks-connect >= 13.0.0 (a.k.a databricks-connect-v2)
# the remote session is instantiated using the databricks module
Expand Down

0 comments on commit 8a1a704

Please sign in to comment.