title: Accessing Azure ADLS gen2 with Pyspark on Databricks
body: <p>I'm trying to learn Spark, Databricks &amp; Azure.</p>
  <p>I'm trying to access GEN2 from Databricks using Pyspark.
  I can't find a proper way, I believe it's super simple but I failed.</p>
  <p>Currently each time I receive the following:</p>
  <pre><code>Unable to access container {name} in account {name} using anonymous
  credentials, and no credentials found for them in the configuration.
  </code></pre>
  <p>I have already running GEN2 + I have a SAS_URI to access.</p>
  <p>What I was trying so far:
  (based on this link: <a href="https://docs.microsoft.com/pl-pl/azure/databricks/data/data-sources/azure/adls-gen2/azure-datalake-gen2-sas-access" rel="nofollow noreferrer">https://docs.microsoft.com/pl-pl/azure/databricks/data/data-sources/azure/adls-gen2/azure-datalake-gen2-sas-access</a>):</p>
  <pre><code>spark.conf.set(f&quot;fs.azure.account.auth.type.{STORAGE_ACCOUNT_NAME}.dfs.core.windows.net&quot;, {SAS_URI})
  spark.conf.set(f&quot;fs.azure.sas.token.provider.type.{STORAGE_ACCOUNT_NAME}.dfs.core.windows.net&quot;, {SAS_URI})
  </code></pre>
  <p>Then to reach out to data:</p>
  <pre><code>sd_xxx = spark.read.parquet(f&quot;wasbs://{CONTAINER_NAME}@{STORAGE_ACCOUNT_NAME}.dfs.core.windows.net/{proper_path_to_files/}&quot;)
  </code></pre>