<?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 How to set the ABFSS URL for Azure Databricks Init Scripts that have spaces in directory names? in Data Engineering</title>
    <link>https://community.databricks.com/t5/data-engineering/how-to-set-the-abfss-url-for-azure-databricks-init-scripts-that/m-p/4006#M866</link>
    <description>&lt;P&gt;I want to use an Init Script on ADLS Gen2 location for my Azure Databricks 11.3 and 12.2 clusters. &lt;/P&gt;&lt;P&gt;The init_script.sh is placed in a directory that has spaces in it:&lt;/P&gt;&lt;P&gt;&lt;A href="https://storageaccount1.blob.core.windows.net/container1/directory%20with%20spaces/subdirectory%20with%20spaces/init_script.sh" target="test_blank"&gt;https://storageaccount1.blob.core.windows.net/container1/directory%20with%20spaces/subdirectory%20with%20spaces/init_script.sh&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;When I pass the equivalent ABFSS URL to Databricks:&lt;/P&gt;&lt;P&gt;abfss://container1@storageaccount1.dfs.core.windows.net/directory%20with%20spaces/subdirectory%20with%20spaces/init_script.sh&lt;/P&gt;&lt;P&gt;The ABFSS URL gets URL encoded again and %20 is converted to %2520 as seen in the cluster creation failure event log:&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;{
  "reason": {
    "code": "INIT_SCRIPT_FAILURE",
    "type": "CLIENT_ERROR",
    "parameters": {
      "instance_id": "a2dcf9efabaf4fd6b3ba3409b09a567f",
      "databricks_error_message": "Cluster scoped init script abfss://container1@storageaccount1.dfs.core.windows.net/directory%20with%20spaces/subdirectory%20with%20spaces/init_script.sh failed: Timed out with exception after 5 attempts (debugStr = 'Reading remote file for init script'), Caused by: java.io.FileNotFoundException: Operation failed: \"The specified path does not exist.\", 404, HEAD, &lt;A href="https://storageaccount1.dfs.core.windows.net/container1/directory%2520with%2520spaces/subdirectory%2520with%2520spaces/init_script.sh?upn=false&amp;amp;action=getStatus&amp;amp;timeout=90&amp;amp;sv=2022-11-02&amp;amp;ss=b&amp;amp;srt=o&amp;amp;sp=rw&amp;amp;se=2023-05-24T16:13:29Z&amp;amp;st=2023-05-24T08:13:29Z&amp;amp;spr=https&amp;amp;sig=XXXXX&amp;quot;" target="test_blank"&gt;https://storageaccount1.dfs.core.windows.net/container1/directory%2520with%2520spaces/subdirectory%2520with%2520spaces/init_script.sh?upn=false&amp;amp;action=getStatus&amp;amp;timeout=90&amp;amp;sv=2022-11-02&amp;amp;ss=b&amp;amp;srt=o&amp;amp;sp=rw&amp;amp;se=2023-05-24T16:13:29Z&amp;amp;st=2023-05-24T08:13:29Z&amp;amp;spr=https&amp;amp;sig=XXXXX"&lt;/A&gt;;
    }
  }
}&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;Also, when I try to pass spaces in ABFSS URL like this:&lt;/P&gt;&lt;P&gt;abfss://container1@storageaccount1.dfs.core.windows.net/directory with spaces/subdirectory with spaces/init_script.sh&lt;/P&gt;&lt;P&gt;I get this error:&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;{
  "reason": {
    "code": "INIT_SCRIPT_FAILURE",
    "type": "CLIENT_ERROR",
    "parameters": {
      "instance_id": "501ad15cd1b1484e973fde156aa85b83",
      "databricks_error_message": "Cluster scoped init script abfss://container1@storageaccount1.dfs.core.windows.net/directory with spaces/subdirectory with spaces/init_script.sh failed: Illegal character in path at index 71: abfss://container1@storageaccount1.dfs.core.windows.net/directory with spaces/subdirectory with spaces/init_script.sh, Caused by: java.net.URISyntaxException: Illegal character in path at index 71: abfss://container1@storageaccount1.dfs.core.windows.net/directory with spaces/subdirectory with spaces/init_script.sh"
    }
  }
}&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So, what's the correct way to pass the ABFSS URL when the directory has spaces?&lt;/P&gt;</description>
    <pubDate>Thu, 25 May 2023 05:18:09 GMT</pubDate>
    <dc:creator>FRG96</dc:creator>
    <dc:date>2023-05-25T05:18:09Z</dc:date>
    <item>
      <title>How to set the ABFSS URL for Azure Databricks Init Scripts that have spaces in directory names?</title>
      <link>https://community.databricks.com/t5/data-engineering/how-to-set-the-abfss-url-for-azure-databricks-init-scripts-that/m-p/4006#M866</link>
      <description>&lt;P&gt;I want to use an Init Script on ADLS Gen2 location for my Azure Databricks 11.3 and 12.2 clusters. &lt;/P&gt;&lt;P&gt;The init_script.sh is placed in a directory that has spaces in it:&lt;/P&gt;&lt;P&gt;&lt;A href="https://storageaccount1.blob.core.windows.net/container1/directory%20with%20spaces/subdirectory%20with%20spaces/init_script.sh" target="test_blank"&gt;https://storageaccount1.blob.core.windows.net/container1/directory%20with%20spaces/subdirectory%20with%20spaces/init_script.sh&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;When I pass the equivalent ABFSS URL to Databricks:&lt;/P&gt;&lt;P&gt;abfss://container1@storageaccount1.dfs.core.windows.net/directory%20with%20spaces/subdirectory%20with%20spaces/init_script.sh&lt;/P&gt;&lt;P&gt;The ABFSS URL gets URL encoded again and %20 is converted to %2520 as seen in the cluster creation failure event log:&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;{
  "reason": {
    "code": "INIT_SCRIPT_FAILURE",
    "type": "CLIENT_ERROR",
    "parameters": {
      "instance_id": "a2dcf9efabaf4fd6b3ba3409b09a567f",
      "databricks_error_message": "Cluster scoped init script abfss://container1@storageaccount1.dfs.core.windows.net/directory%20with%20spaces/subdirectory%20with%20spaces/init_script.sh failed: Timed out with exception after 5 attempts (debugStr = 'Reading remote file for init script'), Caused by: java.io.FileNotFoundException: Operation failed: \"The specified path does not exist.\", 404, HEAD, &lt;A href="https://storageaccount1.dfs.core.windows.net/container1/directory%2520with%2520spaces/subdirectory%2520with%2520spaces/init_script.sh?upn=false&amp;amp;action=getStatus&amp;amp;timeout=90&amp;amp;sv=2022-11-02&amp;amp;ss=b&amp;amp;srt=o&amp;amp;sp=rw&amp;amp;se=2023-05-24T16:13:29Z&amp;amp;st=2023-05-24T08:13:29Z&amp;amp;spr=https&amp;amp;sig=XXXXX&amp;quot;" target="test_blank"&gt;https://storageaccount1.dfs.core.windows.net/container1/directory%2520with%2520spaces/subdirectory%2520with%2520spaces/init_script.sh?upn=false&amp;amp;action=getStatus&amp;amp;timeout=90&amp;amp;sv=2022-11-02&amp;amp;ss=b&amp;amp;srt=o&amp;amp;sp=rw&amp;amp;se=2023-05-24T16:13:29Z&amp;amp;st=2023-05-24T08:13:29Z&amp;amp;spr=https&amp;amp;sig=XXXXX"&lt;/A&gt;;
    }
  }
}&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;Also, when I try to pass spaces in ABFSS URL like this:&lt;/P&gt;&lt;P&gt;abfss://container1@storageaccount1.dfs.core.windows.net/directory with spaces/subdirectory with spaces/init_script.sh&lt;/P&gt;&lt;P&gt;I get this error:&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;{
  "reason": {
    "code": "INIT_SCRIPT_FAILURE",
    "type": "CLIENT_ERROR",
    "parameters": {
      "instance_id": "501ad15cd1b1484e973fde156aa85b83",
      "databricks_error_message": "Cluster scoped init script abfss://container1@storageaccount1.dfs.core.windows.net/directory with spaces/subdirectory with spaces/init_script.sh failed: Illegal character in path at index 71: abfss://container1@storageaccount1.dfs.core.windows.net/directory with spaces/subdirectory with spaces/init_script.sh, Caused by: java.net.URISyntaxException: Illegal character in path at index 71: abfss://container1@storageaccount1.dfs.core.windows.net/directory with spaces/subdirectory with spaces/init_script.sh"
    }
  }
}&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So, what's the correct way to pass the ABFSS URL when the directory has spaces?&lt;/P&gt;</description>
      <pubDate>Thu, 25 May 2023 05:18:09 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/how-to-set-the-abfss-url-for-azure-databricks-init-scripts-that/m-p/4006#M866</guid>
      <dc:creator>FRG96</dc:creator>
      <dc:date>2023-05-25T05:18:09Z</dc:date>
    </item>
  </channel>
</rss>

