'Error while running Scala code - Databricks 7.3LTS and above

I am running databricks 7.3LTS and having errors while trying to use scala bulk copy. The error is: object sqldb is not a member of package com.microsoft. I have installed correct sqlconnector drivers but not sure how to fix this error. The installed drivers are:

com.microsoft.azure:spark-mssql-connector_2.12:1.1.0.

also i have installed the JAR dependencies as below:

spark_mssql_connector_2_12_1_1_0.jar

i couldnt find any scala code example for the above configurations on the internet. my scala code sample is as below:

%scala
import com.microsoft.azure.sqldb.spark.config.Config

as soon as i run this command i get the error

Object sqldb is not a member of package com.microsoft.azure

any help please



Solution 1:[1]

In the new connector you need to use com.microsoft.sqlserver.jdbc.spark.SQLServerBulkJdbcOptions class to specify bulk copy options.

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 Alex Ott