From 73da6a988b6a9180a559ff47f3e3c09d9b544522 Mon Sep 17 00:00:00 2001 From: vighnesh_wednesday Date: Thu, 14 Dec 2023 14:50:29 +0530 Subject: [PATCH] commented unused lines --- app/connect_databricks.py | 30 +++++++++++++++--------------- 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/app/connect_databricks.py b/app/connect_databricks.py index 3347774..d0bd355 100644 --- a/app/connect_databricks.py +++ b/app/connect_databricks.py @@ -1,16 +1,16 @@ import os -from databricks.connect import DatabricksSession -from databricks.sdk import WorkspaceClient +# from databricks.connect import DatabricksSession +# from databricks.sdk import WorkspaceClient -def init_databricks(): - os.system("cp /dbfs/mnt/config/databricks-connect.txt ~/.databrickscfg") +# def init_databricks(): +# os.system("cp /dbfs/mnt/config/databricks-connect.txt ~/.databrickscfg") - spark = DatabricksSession.builder.getOrCreate() +# spark = DatabricksSession.builder.getOrCreate() - dbutils = WorkspaceClient().dbutils +# dbutils = WorkspaceClient().dbutils - return spark, dbutils +# return spark, dbutils def get_param_value(dbutils, param_key): return dbutils.widgets.get(param_key) @@ -35,11 +35,11 @@ def create_mount(dbutils, container_name, mount_path): print(f"{mount_path} Already mounted") -def unmount(dbutils, mount_path): - try: - dbutils.fs.unmount(mount_path) - print("Unmount Successful") - except FileNotFoundError: - print(f"Error: Path not found - {mount_path}") - except Exception as e: # pylint: disable=W0718 - print(f"Error: {e}") +# def unmount(dbutils, mount_path): +# try: +# dbutils.fs.unmount(mount_path) +# print("Unmount Successful") +# except FileNotFoundError: +# print(f"Error: Path not found - {mount_path}") +# except Exception as e: # pylint: disable=W0718 +# print(f"Error: {e}")