<?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 Error on Azure-Databricks write RDD to storage account with wsabs:// in Data Engineering</title>
    <link>https://community.databricks.com/t5/data-engineering/error-on-azure-databricks-write-rdd-to-storage-account-with/m-p/18756#M12491</link>
    <description>&lt;P&gt;Hi, I'm trying to write data from RDD to the storage account:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Adding storage account key:&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;spark.conf.set("fs.azure.account.key.y.blob.core.windows.net", "myStorageAccountKey")&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;Read and write to the same storage:&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;val path = "wasbs://x@y.blob.core.windows.net/data/x.csv"
val df = spark.read.format("csv").load(path)
df.rdd.saveAsObjectFile("wasbs://x@y.blob.core.windows.net/out/out.csv")&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;Error:&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;shaded.databricks.org.apache.hadoop.fs.azure.AzureException: shaded.databricks.org.apache.hadoop.fs.azure.AzureException: Container x in account y.blob.core.windows.net not found, and we can't create it using anoynomous credentials, and no credentials found for them in the configuration.
	at shaded.databricks.org.apache.hadoop.fs.azure.AzureNativeFileSystemStore.createAzureStorageSession(AzureNativeFileSystemStore.java:1037)
	at shaded.databricks.org.apache.hadoop.fs.azure.AzureNativeFileSystemStore.initialize(AzureNativeFileSystemStore.java:488)
	at shaded.databricks.org.apache.hadoop.fs.azure.NativeAzureFileSystem.initialize(NativeAzureFileSystem.java:1325)
	at org.apache.hadoop.fs.FileSystem.createFileSystem(FileSystem.java:2669)
	at org.apache.hadoop.fs.FileSystem.get(FileSystem.java:370)
	at org.apache.hadoop.fs.Path.getFileSystem(Path.java:295)
	at org.apache.spark.sql.execution.datasources.DataSource$$anonfun$org$apache$spark$sql$execution$datasources$DataSource$$checkAndGlobPathIfNecessary$1.apply(DataSource.scala:603)&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;The same code works when I save dataframe (not RDD):&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;df.write.csv("wasbs://x@y.blob.core.windows.net/out/obj.csv")&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;Looks like RDD doesn't know how to connect to the storage account by wasbs://.&lt;/P&gt;&lt;P&gt;Any ideas on how to fix this without a mount (dbutils.fs.mount)? &lt;/P&gt;&lt;P&gt;Thanks!&lt;/P&gt;</description>
    <pubDate>Fri, 03 Jun 2022 13:46:50 GMT</pubDate>
    <dc:creator>Vadim1</dc:creator>
    <dc:date>2022-06-03T13:46:50Z</dc:date>
    <item>
      <title>Error on Azure-Databricks write RDD to storage account with wsabs://</title>
      <link>https://community.databricks.com/t5/data-engineering/error-on-azure-databricks-write-rdd-to-storage-account-with/m-p/18756#M12491</link>
      <description>&lt;P&gt;Hi, I'm trying to write data from RDD to the storage account:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Adding storage account key:&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;spark.conf.set("fs.azure.account.key.y.blob.core.windows.net", "myStorageAccountKey")&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;Read and write to the same storage:&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;val path = "wasbs://x@y.blob.core.windows.net/data/x.csv"
val df = spark.read.format("csv").load(path)
df.rdd.saveAsObjectFile("wasbs://x@y.blob.core.windows.net/out/out.csv")&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;Error:&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;shaded.databricks.org.apache.hadoop.fs.azure.AzureException: shaded.databricks.org.apache.hadoop.fs.azure.AzureException: Container x in account y.blob.core.windows.net not found, and we can't create it using anoynomous credentials, and no credentials found for them in the configuration.
	at shaded.databricks.org.apache.hadoop.fs.azure.AzureNativeFileSystemStore.createAzureStorageSession(AzureNativeFileSystemStore.java:1037)
	at shaded.databricks.org.apache.hadoop.fs.azure.AzureNativeFileSystemStore.initialize(AzureNativeFileSystemStore.java:488)
	at shaded.databricks.org.apache.hadoop.fs.azure.NativeAzureFileSystem.initialize(NativeAzureFileSystem.java:1325)
	at org.apache.hadoop.fs.FileSystem.createFileSystem(FileSystem.java:2669)
	at org.apache.hadoop.fs.FileSystem.get(FileSystem.java:370)
	at org.apache.hadoop.fs.Path.getFileSystem(Path.java:295)
	at org.apache.spark.sql.execution.datasources.DataSource$$anonfun$org$apache$spark$sql$execution$datasources$DataSource$$checkAndGlobPathIfNecessary$1.apply(DataSource.scala:603)&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;The same code works when I save dataframe (not RDD):&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;df.write.csv("wasbs://x@y.blob.core.windows.net/out/obj.csv")&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;Looks like RDD doesn't know how to connect to the storage account by wasbs://.&lt;/P&gt;&lt;P&gt;Any ideas on how to fix this without a mount (dbutils.fs.mount)? &lt;/P&gt;&lt;P&gt;Thanks!&lt;/P&gt;</description>
      <pubDate>Fri, 03 Jun 2022 13:46:50 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/error-on-azure-databricks-write-rdd-to-storage-account-with/m-p/18756#M12491</guid>
      <dc:creator>Vadim1</dc:creator>
      <dc:date>2022-06-03T13:46:50Z</dc:date>
    </item>
    <item>
      <title>Re: Error on Azure-Databricks write RDD to storage account with wsabs://</title>
      <link>https://community.databricks.com/t5/data-engineering/error-on-azure-databricks-write-rdd-to-storage-account-with/m-p/18757#M12492</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You probably need below config for RDD APIs&lt;/P&gt;&lt;OL&gt;&lt;LI&gt;spark.conf.set("spark.hadoop.fs.azure.account.key.y.blob.core.windows.net", "myStorageAccountKey")&lt;/LI&gt;&lt;/OL&gt;&lt;P&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 06 Jun 2022 03:26:37 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/error-on-azure-databricks-write-rdd-to-storage-account-with/m-p/18757#M12492</guid>
      <dc:creator>User16764241763</dc:creator>
      <dc:date>2022-06-06T03:26:37Z</dc:date>
    </item>
    <item>
      <title>Re: Error on Azure-Databricks write RDD to storage account with wsabs://</title>
      <link>https://community.databricks.com/t5/data-engineering/error-on-azure-databricks-write-rdd-to-storage-account-with/m-p/18758#M12493</link>
      <description>&lt;P&gt;Hi, thanks a lot aravish! This didn't work from a notebook but &lt;B&gt;worked &lt;/B&gt;when I added it in Advanced options to spark config of the cluster:&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;spark.hadoop.fs.azure.account.key.y.blob.core.windows.net key&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 06 Jun 2022 05:25:04 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/error-on-azure-databricks-write-rdd-to-storage-account-with/m-p/18758#M12493</guid>
      <dc:creator>Vadim1</dc:creator>
      <dc:date>2022-06-06T05:25:04Z</dc:date>
    </item>
    <item>
      <title>Re: Error on Azure-Databricks write RDD to storage account with wsabs://</title>
      <link>https://community.databricks.com/t5/data-engineering/error-on-azure-databricks-write-rdd-to-storage-account-with/m-p/37359#M26332</link>
      <description>&lt;P&gt;Hello&amp;nbsp;&lt;a href="https://community.databricks.com/t5/user/viewprofilepage/user-id/40579"&gt;@Vadim1&lt;/a&gt;&amp;nbsp;and&amp;nbsp;&lt;a href="https://community.databricks.com/t5/user/viewprofilepage/user-id/1015"&gt;@User16764241763&lt;/a&gt;. I'm wondering if you find a way to avoid adding the hardcoded key in the advanced options spark config section in the cluster configuration.&amp;nbsp;&lt;/P&gt;&lt;P&gt;Is there a similar command to spark.conf.set("spark.hadoop.fs.azure.account.key.y.blob.core.windows.net", "myStorageAccountKey") that works on the notebook level after getting the key from the secret scope ?&lt;BR /&gt;&lt;BR /&gt;Kind regards&lt;/P&gt;</description>
      <pubDate>Tue, 11 Jul 2023 08:11:55 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/error-on-azure-databricks-write-rdd-to-storage-account-with/m-p/37359#M26332</guid>
      <dc:creator>TheoDeSo</dc:creator>
      <dc:date>2023-07-11T08:11:55Z</dc:date>
    </item>
  </channel>
</rss>

