On Databricks I would like to install a Maven library through commands in a Python Notebook if its not already installed.
If it were a Python PyPI library I would do something like the following:
# Get a list of all available library
library_name_list = dbutils.library.list()
# Suppose the library of interest was "scikit-learn"
if "scikit-learn" not in library_name_list:
# Install the library
dbutils.library.installPyPI("scikit-learn")
How can I do the same for a Maven library "com.microsoft.azure.kusto:spark-kusto-connector:2.0.0" i.e. check if it is already installed, if not then install?
I can install the Maven library using the UI by going to "Clusters" -> "Libraries" -> "Install New" -> "Maven". But I would like to do it programmatically through a script.