<?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 Re: ADLS gen2 config issue in Data Engineering</title>
    <link>https://community.databricks.com/t5/data-engineering/adls-gen2-config-issue/m-p/93218#M38655</link>
    <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.databricks.com/t5/user/viewprofilepage/user-id/110502"&gt;@szymon_dybczak&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;&lt;P&gt;I tried above settings, but results same error.&lt;/P&gt;</description>
    <pubDate>Wed, 09 Oct 2024 04:40:10 GMT</pubDate>
    <dc:creator>mr_poola49</dc:creator>
    <dc:date>2024-10-09T04:40:10Z</dc:date>
    <item>
      <title>ADLS gen2 config issue</title>
      <link>https://community.databricks.com/t5/data-engineering/adls-gen2-config-issue/m-p/92961#M38592</link>
      <description>&lt;P&gt;I am new to Azure Databricks. I am trying to access ADLS gen2 from Azure Databricks. I've set all the required configurations in the notebook but when I try to query the table using SPAR.SQL(), it is throwing exception "Failure to initialize configuration for storage account". I am using OAuth using client id and secret to authenticate the storage account. One strange thing is I have set the spark configs to&amp;nbsp; &lt;U&gt;&lt;STRONG&gt;prodadlsg2&amp;nbsp;&lt;/STRONG&gt;&lt;/U&gt; but the error is pointing to different storage account&amp;nbsp;&lt;U&gt;&lt;STRONG&gt;ppeadlsg2.&amp;nbsp;&lt;/STRONG&gt;&lt;/U&gt;Not sure how to correct this issue. I would like to connect to prod storage instead of &amp;nbsp;&lt;U&gt;&lt;STRONG&gt;ppeadlsg2&lt;/STRONG&gt;&lt;/U&gt;. Also, I want to remove the configs related to PPE storage account. Please assist me in this regard. I am using 15.4 LTS DBR. Actual storage account names are different from what is given in the code snippet due to data sensitivity.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="java"&gt;spark.conf.set("fs.azure.account.auth.type.prodadlsg2.dfs.core.windows.net", "OAuth")
spark.conf.set("fs.azure.account.oauth.provider.type.prodadlsg2.dfs.core.windows.net", "org.apache.hadoop.fs.azurebfs.oauth2.ClientCredsTokenProvider")
spark.conf.set("fs.azure.account.oauth2.client.id.prodadlsg2.dfs.core.windows.net", &amp;lt;application_id&amp;gt;)
spark.conf.set("fs.azure.account.oauth2.client.secret.prodadlsg2.dfs.core.windows.net", &amp;lt;application_secret&amp;gt;)
spark.conf.set("fs.azure.account.oauth2.client.endpoint.prodadlsg2.dfs.core.windows.net", s"https://login.microsoftonline.com/&amp;lt;tenantId&amp;gt;/oauth2/token")

val sqlContext = spark.sqlContext
val tableNamesInDb = sqlContext.tableNames("default").toSet

val tableName = "some_table"
val tableExists = tableNamesInDb.contains(tableName)

if (!tableExists) {
spark.sql(s"CREATE TABLE $tableName USING DELTA LOCATION 'abfss://$StorageContainer@prodadlsg2.dfs.core.windows.net/$standardizationRootPath/$entity/$version/standard'")
}

val countDf = spark.sql(s"SELECT COUNT(*) AS record_count FROM $tableName")
display(countDf)&lt;/LI-CODE&gt;&lt;LI-CODE lang="markup"&gt;KeyProviderException: Failure to initialize configuration for storage account ppeadlsg2.dfs.core.windows.net: Invalid configuration value detected for fs.azure.account.key
Caused by: InvalidConfigurationValueException: Invalid configuration value detected for fs.azure.account.key
	&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 07 Oct 2024 12:37:04 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/adls-gen2-config-issue/m-p/92961#M38592</guid>
      <dc:creator>mr_poola49</dc:creator>
      <dc:date>2024-10-07T12:37:04Z</dc:date>
    </item>
    <item>
      <title>Re: ADLS gen2 config issue</title>
      <link>https://community.databricks.com/t5/data-engineering/adls-gen2-config-issue/m-p/92993#M38603</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.databricks.com/t5/user/viewprofilepage/user-id/78142"&gt;@mr_poola49&lt;/a&gt;,&lt;/P&gt;&lt;P&gt;Did you assigned proper role for service principal in this storage account? Also, could you try to perform following test:&lt;/P&gt;&lt;P&gt;- try to set&lt;SPAN&gt;&amp;nbsp;the secrets in the cluster configuration, not in the "notebook" (like in below screenshot)&lt;BR /&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="szymon_dybczak_0-1728323695006.png" style="width: 400px;"&gt;&lt;img src="https://community.databricks.com/t5/image/serverpage/image-id/11736i195A287F5C9151C2/image-size/medium?v=v2&amp;amp;px=400" role="button" title="szymon_dybczak_0-1728323695006.png" alt="szymon_dybczak_0-1728323695006.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;I know that it sounds weird, but I had similar problem in the past&amp;nbsp;even though spark.conf was set correctly in the "notebook".&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 07 Oct 2024 17:54:55 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/adls-gen2-config-issue/m-p/92993#M38603</guid>
      <dc:creator>szymon_dybczak</dc:creator>
      <dc:date>2024-10-07T17:54:55Z</dc:date>
    </item>
    <item>
      <title>Re: ADLS gen2 config issue</title>
      <link>https://community.databricks.com/t5/data-engineering/adls-gen2-config-issue/m-p/93218#M38655</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.databricks.com/t5/user/viewprofilepage/user-id/110502"&gt;@szymon_dybczak&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;&lt;P&gt;I tried above settings, but results same error.&lt;/P&gt;</description>
      <pubDate>Wed, 09 Oct 2024 04:40:10 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/adls-gen2-config-issue/m-p/93218#M38655</guid>
      <dc:creator>mr_poola49</dc:creator>
      <dc:date>2024-10-09T04:40:10Z</dc:date>
    </item>
    <item>
      <title>Re: ADLS gen2 config issue</title>
      <link>https://community.databricks.com/t5/data-engineering/adls-gen2-config-issue/m-p/93246#M38664</link>
      <description>&lt;P&gt;Issue is resolved! dropped the table from hive_metastore which is pointing to &lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;U&gt;&lt;STRONG&gt;ppeadlsg2&amp;nbsp;&lt;/STRONG&gt;&lt;/U&gt; storage container and re-created it using prodadlsg2 storage.&lt;/P&gt;</description>
      <pubDate>Wed, 09 Oct 2024 10:25:28 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/adls-gen2-config-issue/m-p/93246#M38664</guid>
      <dc:creator>mr_poola49</dc:creator>
      <dc:date>2024-10-09T10:25:28Z</dc:date>
    </item>
  </channel>
</rss>

