<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic mount a Azure DL in Databricks in Data Engineering</title>
    <link>https://community.databricks.com/t5/data-engineering/mount-a-azure-dl-in-databricks/m-p/24587#M17117</link>
    <description>&lt;P&gt;Hello Team,&lt;/P&gt;&lt;P&gt;I am quite new to Databricks and I am learning PySpark and Databricks. &lt;/P&gt;&lt;P&gt;I am trying to mount a DL Gen2 in Databricks, as part of that I had created app registration, added DL into app registration permissions, created a secret and also added the clientid, secret and tenantid in azure vault. I also created the scope too, but I am getting below error:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please advice, what's the mistake.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ExecutionError: An error occurred while calling o376.mount.&lt;/P&gt;&lt;P&gt;: java.lang.NullPointerException: authEndpoint&lt;/P&gt;&lt;P&gt;	at shaded.databricks.v20180920_b33d810.com.google.common.base.Preconditions.checkNotNull(Preconditions.java:204)&lt;/P&gt;&lt;P&gt;	at shaded.databricks.v20180920_b33d810.org.apache.hadoop.fs.azurebfs.oauth2.AzureADAuthenticator.getTokenUsingClientCreds(AzureADAuthenticator.java:84)&lt;/P&gt;&lt;P&gt;	at com.databricks.backend.daemon.dbutils.DBUtilsCore.verifyAzureOAuth(DBUtilsCore.scala:751)&lt;/P&gt;&lt;P&gt;	at com.databricks.backend.daemon.dbutils.DBUtilsCore.verifyAzureFileSystem(DBUtilsCore.scala:762)&lt;/P&gt;&lt;P&gt;	at com.databricks.backend.daemon.dbutils.DBUtilsCore.mount(DBUtilsCore.scala:720)&lt;/P&gt;&lt;P&gt;	at sun.reflect.GeneratedMethodAccessor291.invoke(Unknown Source)&lt;/P&gt;&lt;P&gt;	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)&lt;/P&gt;&lt;P&gt;	at java.lang.reflect.Method.invoke(Method.java:498)&lt;/P&gt;&lt;P&gt;	at py4j.reflection.MethodInvoker.invoke(MethodInvoker.java:244)&lt;/P&gt;&lt;P&gt;	at py4j.reflection.ReflectionEngine.invoke(ReflectionEngine.java:380)&lt;/P&gt;&lt;P&gt;	at py4j.Gateway.invoke(Gateway.java:295)&lt;/P&gt;&lt;P&gt;	at py4j.commands.AbstractCommand.invokeMethod(AbstractCommand.java:132)&lt;/P&gt;&lt;P&gt;	at py4j.commands.CallCommand.execute(CallCommand.java:79)&lt;/P&gt;&lt;P&gt;	at py4j.GatewayConnection.run(GatewayConnection.java:251)&lt;/P&gt;&lt;P&gt;	at java.lang.Thread.run(Thread.java:748)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Script I ran, to mount:&lt;/P&gt;&lt;P&gt;applicationId=dbutils.secrets.get(scope="testscope",key="clientid")&lt;/P&gt;&lt;P&gt;authenticationKey=dbutils.secrets.get(scope="testscope",key="clientsecret")&lt;/P&gt;&lt;P&gt;tenandId=dbutils.secrets.get(scope="testscope",key="tenantid")&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;endpoint="&lt;A href="https://login.microsoftonline.com/" alt="https://login.microsoftonline.com/" target="_blank"&gt;https://login.microsoftonline.com/&lt;/A&gt;"+tenandId+"/oauth2/token"&lt;/P&gt;&lt;P&gt;source="abfss://"+adlsContainerName+"@"+adlsAccountName+".&lt;A href="https://dfs.core.windows.net" alt="https://dfs.core.windows.net" target="_blank"&gt;dfs.core.windows.net&lt;/A&gt;/"+adlsFolderName&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;# connecting using service principle oAuth&lt;/P&gt;&lt;P&gt;configs = {"fs.azure.account.auth.type": "OAuth",&lt;/P&gt;&lt;P&gt;"fs.azure.account.oauth.provider.type": "org.apache.hadoop.fs.azurebfs.oauth2.ClientCredsTokenProvider",&lt;/P&gt;&lt;P&gt;"&lt;A href="https://fs.azure.account.oauth2.client.id" alt="https://fs.azure.account.oauth2.client.id" target="_blank"&gt;fs.azure.account.oauth2.client.id&lt;/A&gt;": applicationId,&amp;nbsp;&lt;/P&gt;&lt;P&gt;"fs.azure.account.oauth2.client.secret": authenticationKey,&lt;/P&gt;&lt;P&gt;"fs.azure.account.oauth2.client.endoint": "&lt;A href="https://login.microsoftonline.com/" alt="https://login.microsoftonline.com/" target="_blank"&gt;https://login.microsoftonline.com/&lt;/A&gt;"+tenandId+"/oauth2/token"}&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;## mounting the ADLS storage to Databricks. Mount only if the directory is not already mounted&lt;/P&gt;&lt;P&gt;dbutils.fs.mount(&lt;/P&gt;&lt;P&gt;&amp;nbsp;source = source,&lt;/P&gt;&lt;P&gt;&amp;nbsp;mount_point = "/mnt/adls",&lt;/P&gt;&lt;P&gt;&amp;nbsp;extra_configs = configs)&lt;/P&gt;</description>
    <pubDate>Sat, 26 Mar 2022 03:19:19 GMT</pubDate>
    <dc:creator>Krish123</dc:creator>
    <dc:date>2022-03-26T03:19:19Z</dc:date>
    <item>
      <title>mount a Azure DL in Databricks</title>
      <link>https://community.databricks.com/t5/data-engineering/mount-a-azure-dl-in-databricks/m-p/24587#M17117</link>
      <description>&lt;P&gt;Hello Team,&lt;/P&gt;&lt;P&gt;I am quite new to Databricks and I am learning PySpark and Databricks. &lt;/P&gt;&lt;P&gt;I am trying to mount a DL Gen2 in Databricks, as part of that I had created app registration, added DL into app registration permissions, created a secret and also added the clientid, secret and tenantid in azure vault. I also created the scope too, but I am getting below error:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please advice, what's the mistake.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ExecutionError: An error occurred while calling o376.mount.&lt;/P&gt;&lt;P&gt;: java.lang.NullPointerException: authEndpoint&lt;/P&gt;&lt;P&gt;	at shaded.databricks.v20180920_b33d810.com.google.common.base.Preconditions.checkNotNull(Preconditions.java:204)&lt;/P&gt;&lt;P&gt;	at shaded.databricks.v20180920_b33d810.org.apache.hadoop.fs.azurebfs.oauth2.AzureADAuthenticator.getTokenUsingClientCreds(AzureADAuthenticator.java:84)&lt;/P&gt;&lt;P&gt;	at com.databricks.backend.daemon.dbutils.DBUtilsCore.verifyAzureOAuth(DBUtilsCore.scala:751)&lt;/P&gt;&lt;P&gt;	at com.databricks.backend.daemon.dbutils.DBUtilsCore.verifyAzureFileSystem(DBUtilsCore.scala:762)&lt;/P&gt;&lt;P&gt;	at com.databricks.backend.daemon.dbutils.DBUtilsCore.mount(DBUtilsCore.scala:720)&lt;/P&gt;&lt;P&gt;	at sun.reflect.GeneratedMethodAccessor291.invoke(Unknown Source)&lt;/P&gt;&lt;P&gt;	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)&lt;/P&gt;&lt;P&gt;	at java.lang.reflect.Method.invoke(Method.java:498)&lt;/P&gt;&lt;P&gt;	at py4j.reflection.MethodInvoker.invoke(MethodInvoker.java:244)&lt;/P&gt;&lt;P&gt;	at py4j.reflection.ReflectionEngine.invoke(ReflectionEngine.java:380)&lt;/P&gt;&lt;P&gt;	at py4j.Gateway.invoke(Gateway.java:295)&lt;/P&gt;&lt;P&gt;	at py4j.commands.AbstractCommand.invokeMethod(AbstractCommand.java:132)&lt;/P&gt;&lt;P&gt;	at py4j.commands.CallCommand.execute(CallCommand.java:79)&lt;/P&gt;&lt;P&gt;	at py4j.GatewayConnection.run(GatewayConnection.java:251)&lt;/P&gt;&lt;P&gt;	at java.lang.Thread.run(Thread.java:748)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Script I ran, to mount:&lt;/P&gt;&lt;P&gt;applicationId=dbutils.secrets.get(scope="testscope",key="clientid")&lt;/P&gt;&lt;P&gt;authenticationKey=dbutils.secrets.get(scope="testscope",key="clientsecret")&lt;/P&gt;&lt;P&gt;tenandId=dbutils.secrets.get(scope="testscope",key="tenantid")&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;endpoint="&lt;A href="https://login.microsoftonline.com/" alt="https://login.microsoftonline.com/" target="_blank"&gt;https://login.microsoftonline.com/&lt;/A&gt;"+tenandId+"/oauth2/token"&lt;/P&gt;&lt;P&gt;source="abfss://"+adlsContainerName+"@"+adlsAccountName+".&lt;A href="https://dfs.core.windows.net" alt="https://dfs.core.windows.net" target="_blank"&gt;dfs.core.windows.net&lt;/A&gt;/"+adlsFolderName&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;# connecting using service principle oAuth&lt;/P&gt;&lt;P&gt;configs = {"fs.azure.account.auth.type": "OAuth",&lt;/P&gt;&lt;P&gt;"fs.azure.account.oauth.provider.type": "org.apache.hadoop.fs.azurebfs.oauth2.ClientCredsTokenProvider",&lt;/P&gt;&lt;P&gt;"&lt;A href="https://fs.azure.account.oauth2.client.id" alt="https://fs.azure.account.oauth2.client.id" target="_blank"&gt;fs.azure.account.oauth2.client.id&lt;/A&gt;": applicationId,&amp;nbsp;&lt;/P&gt;&lt;P&gt;"fs.azure.account.oauth2.client.secret": authenticationKey,&lt;/P&gt;&lt;P&gt;"fs.azure.account.oauth2.client.endoint": "&lt;A href="https://login.microsoftonline.com/" alt="https://login.microsoftonline.com/" target="_blank"&gt;https://login.microsoftonline.com/&lt;/A&gt;"+tenandId+"/oauth2/token"}&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;## mounting the ADLS storage to Databricks. Mount only if the directory is not already mounted&lt;/P&gt;&lt;P&gt;dbutils.fs.mount(&lt;/P&gt;&lt;P&gt;&amp;nbsp;source = source,&lt;/P&gt;&lt;P&gt;&amp;nbsp;mount_point = "/mnt/adls",&lt;/P&gt;&lt;P&gt;&amp;nbsp;extra_configs = configs)&lt;/P&gt;</description>
      <pubDate>Sat, 26 Mar 2022 03:19:19 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/mount-a-azure-dl-in-databricks/m-p/24587#M17117</guid>
      <dc:creator>Krish123</dc:creator>
      <dc:date>2022-03-26T03:19:19Z</dc:date>
    </item>
  </channel>
</rss>

