<?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 Python spark.read.text Path does not exist in Data Engineering</title>
    <link>https://community.databricks.com/t5/data-engineering/python-spark-read-text-path-does-not-exist/m-p/27685#M19546</link>
    <description>&lt;P&gt;&lt;/P&gt;
&lt;P&gt;Dear all,&lt;/P&gt;
&lt;P&gt;I want to read files with python from a storage account. I followed this instruction &lt;A href="https://docs.microsoft.com/en-us/azure/azure-databricks/store-secrets-azure-key-vault" target="test_blank"&gt;https://docs.microsoft.com/en-us/azure/azure-databricks/store-secrets-azure-key-vault&lt;/A&gt;. &lt;/P&gt;
&lt;P&gt;This is my python code:&lt;/P&gt;
&lt;P&gt;dbutils.fs.mount(source = "wasbs://&lt;I&gt;container1&lt;/I&gt;@datalake1.blob.core.windows.net", mount_point = "/mnt/container1", extra_configs = {"fs.azure.sas.&lt;I&gt;container1.datalake1&lt;/I&gt;.blob.core.windows.net":dbutils.secrets.get(scope = "&lt;I&gt;secretscope&lt;/I&gt;", key = "&lt;I&gt;secret&lt;/I&gt;")}) &lt;/P&gt;
&lt;P&gt;df = spark.read.text("mnt/container1/helloworld.txt")&lt;/P&gt;
&lt;P&gt;df.show()&lt;/P&gt;
&lt;P&gt;The mount part runs succesfull, but it is not possible to read the file which is located in the container. I got this error "AnalysisException: 'Path does not exist: dbfs:/mnt/container1/helloworld.txt;'". &lt;/P&gt;
&lt;P&gt;Is this a security reason?&lt;/P&gt;
&lt;P&gt;Any help would be appreciated!!! Thank you very much!!&lt;/P&gt;
&lt;P&gt;best regards,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;Rudolf 
&lt;P&gt;&lt;/P&gt;</description>
    <pubDate>Mon, 21 Oct 2019 08:42:56 GMT</pubDate>
    <dc:creator>rba76</dc:creator>
    <dc:date>2019-10-21T08:42:56Z</dc:date>
    <item>
      <title>Python spark.read.text Path does not exist</title>
      <link>https://community.databricks.com/t5/data-engineering/python-spark-read-text-path-does-not-exist/m-p/27685#M19546</link>
      <description>&lt;P&gt;&lt;/P&gt;
&lt;P&gt;Dear all,&lt;/P&gt;
&lt;P&gt;I want to read files with python from a storage account. I followed this instruction &lt;A href="https://docs.microsoft.com/en-us/azure/azure-databricks/store-secrets-azure-key-vault" target="test_blank"&gt;https://docs.microsoft.com/en-us/azure/azure-databricks/store-secrets-azure-key-vault&lt;/A&gt;. &lt;/P&gt;
&lt;P&gt;This is my python code:&lt;/P&gt;
&lt;P&gt;dbutils.fs.mount(source = "wasbs://&lt;I&gt;container1&lt;/I&gt;@datalake1.blob.core.windows.net", mount_point = "/mnt/container1", extra_configs = {"fs.azure.sas.&lt;I&gt;container1.datalake1&lt;/I&gt;.blob.core.windows.net":dbutils.secrets.get(scope = "&lt;I&gt;secretscope&lt;/I&gt;", key = "&lt;I&gt;secret&lt;/I&gt;")}) &lt;/P&gt;
&lt;P&gt;df = spark.read.text("mnt/container1/helloworld.txt")&lt;/P&gt;
&lt;P&gt;df.show()&lt;/P&gt;
&lt;P&gt;The mount part runs succesfull, but it is not possible to read the file which is located in the container. I got this error "AnalysisException: 'Path does not exist: dbfs:/mnt/container1/helloworld.txt;'". &lt;/P&gt;
&lt;P&gt;Is this a security reason?&lt;/P&gt;
&lt;P&gt;Any help would be appreciated!!! Thank you very much!!&lt;/P&gt;
&lt;P&gt;best regards,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;Rudolf 
&lt;P&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 21 Oct 2019 08:42:56 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/python-spark-read-text-path-does-not-exist/m-p/27685#M19546</guid>
      <dc:creator>rba76</dc:creator>
      <dc:date>2019-10-21T08:42:56Z</dc:date>
    </item>
    <item>
      <title>Re: Python spark.read.text Path does not exist</title>
      <link>https://community.databricks.com/t5/data-engineering/python-spark-read-text-path-does-not-exist/m-p/27686#M19547</link>
      <description>&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hi @rba76,&lt;/P&gt;&lt;P&gt;Please follow as below,&lt;/P&gt;&lt;P&gt;&lt;A href="https://docs.azuredatabricks.net/data/data-sources/azure/azure-storage.html" target="_blank"&gt;https://docs.azuredatabricks.net/data/data-sources/azure/azure-storage.html&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 22 Oct 2019 07:19:44 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/python-spark-read-text-path-does-not-exist/m-p/27686#M19547</guid>
      <dc:creator>shyam_9</dc:creator>
      <dc:date>2019-10-22T07:19:44Z</dc:date>
    </item>
    <item>
      <title>Re: Python spark.read.text Path does not exist</title>
      <link>https://community.databricks.com/t5/data-engineering/python-spark-read-text-path-does-not-exist/m-p/27687#M19548</link>
      <description>&lt;P&gt;@rba76​&amp;nbsp; Make sure helloworld.txt file exists in the container1 folder&lt;/P&gt;&lt;P&gt;I'm able to view the text file using the same commands as follows:&lt;/P&gt;&lt;P&gt;&lt;B&gt;Mount Blob Storage:&lt;/B&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;dbutils.fs.mount(
  source = "wasbs://sampledata@azure.blob.core.windows.net/Azure",
  mount_point = "/mnt/chepra",
  extra_configs = {"fs.azure.sas.sampledata.azure.blob.core.windows.net":dbutils.secrets.get(scope = "azurestorage", key = "azurestoragekey")})&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;B&gt;Access files in your container as if they were local files, for example:&lt;/B&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;df = spark.read.text("/mnt/chepra/systeminfo.txt")
df.show()&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="adbtextread.jpg"&gt;&lt;img src="https://community.databricks.com/t5/image/serverpage/image-id/2523i1E3109987841E068/image-size/large?v=v2&amp;amp;px=999" role="button" title="adbtextread.jpg" alt="adbtextread.jpg" /&gt;&lt;/span&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope this helps. &lt;/P&gt;</description>
      <pubDate>Fri, 25 Oct 2019 10:30:52 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/python-spark-read-text-path-does-not-exist/m-p/27687#M19548</guid>
      <dc:creator>PRADEEPCHEEKATL</dc:creator>
      <dc:date>2019-10-25T10:30:52Z</dc:date>
    </item>
  </channel>
</rss>

