<?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: Authentication to read data from Lakehouse using ABFS path and python/spark code in Pipelines</title>
    <link>https://community.fabric.microsoft.com/t5/Pipelines/Authentication-to-read-data-from-Lakehouse-using-ABFS-path-and/m-p/3923286#M3374</link>
    <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="734850" data-lia-user-login="antoniofarias" class="lia-mention lia-mention-user"&gt;antoniofarias&lt;/a&gt;&amp;nbsp;&lt;BR /&gt;Are you running the above code in Databricks or Fabric? Can you please provide me these details&lt;BR /&gt;&lt;BR /&gt;Thanks&lt;/P&gt;</description>
    <pubDate>Thu, 16 May 2024 09:22:42 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2024-05-16T09:22:42Z</dc:date>
    <item>
      <title>Authentication to read data from Lakehouse using ABFS path and python/spark code</title>
      <link>https://community.fabric.microsoft.com/t5/Pipelines/Authentication-to-read-data-from-Lakehouse-using-ABFS-path-and/m-p/3917915#M3298</link>
      <description>&lt;P&gt;I'm trying to read data from lakehouse using a python code, is there any documentation of authentication to use and help me, because I did't found any one.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I already created an app registration conected into fabric and have client id, secret value...&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I know how to write and read with a abfs path but I don't know how to authenticate into.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I already found something using the Azure Databricks, but at this time I need to do this without use azure.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 14 May 2024 16:16:51 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Pipelines/Authentication-to-read-data-from-Lakehouse-using-ABFS-path-and/m-p/3917915#M3298</guid>
      <dc:creator>antoniofarias</dc:creator>
      <dc:date>2024-05-14T16:16:51Z</dc:date>
    </item>
    <item>
      <title>Re: Authentication to read data from Lakehouse using ABFS path and python/spark code</title>
      <link>https://community.fabric.microsoft.com/t5/Pipelines/Authentication-to-read-data-from-Lakehouse-using-ABFS-path-and/m-p/3919753#M3327</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="734850" data-lia-user-login="antoniofarias" class="lia-mention lia-mention-user"&gt;antoniofarias&lt;/a&gt;&amp;nbsp;&lt;BR /&gt;Thanks for using Fabric Community.&lt;BR /&gt;You can refer to this doc :&amp;nbsp;&lt;A href="https://debruyn.dev/2023/connect-to-fabric-lakehouses-warehouses-from-python-code/" target="_blank"&gt;Connect to Fabric Lakehouses &amp;amp; Warehouses from Python code - Sam Debruyn&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;Hope this helps. Please let me know if you have any further questions.&lt;/P&gt;</description>
      <pubDate>Wed, 15 May 2024 07:49:19 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Pipelines/Authentication-to-read-data-from-Lakehouse-using-ABFS-path-and/m-p/3919753#M3327</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2024-05-15T07:49:19Z</dc:date>
    </item>
    <item>
      <title>Re: Authentication to read data from Lakehouse using ABFS path and python/spark code</title>
      <link>https://community.fabric.microsoft.com/t5/Pipelines/Authentication-to-read-data-from-Lakehouse-using-ABFS-path-and/m-p/3920851#M3345</link>
      <description>&lt;P&gt;Hi&amp;nbsp;Anonymous&lt;/a&gt;, thanks for your reply, I used this code yesterday and it worked in Databricks but didn't in vscode&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Some errors I got:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 15 May 2024 13:23:58 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Pipelines/Authentication-to-read-data-from-Lakehouse-using-ABFS-path-and/m-p/3920851#M3345</guid>
      <dc:creator>antoniofarias</dc:creator>
      <dc:date>2024-05-15T13:23:58Z</dc:date>
    </item>
    <item>
      <title>Re: Authentication to read data from Lakehouse using ABFS path and python/spark code</title>
      <link>https://community.fabric.microsoft.com/t5/Pipelines/Authentication-to-read-data-from-Lakehouse-using-ABFS-path-and/m-p/3923286#M3374</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="734850" data-lia-user-login="antoniofarias" class="lia-mention lia-mention-user"&gt;antoniofarias&lt;/a&gt;&amp;nbsp;&lt;BR /&gt;Are you running the above code in Databricks or Fabric? Can you please provide me these details&lt;BR /&gt;&lt;BR /&gt;Thanks&lt;/P&gt;</description>
      <pubDate>Thu, 16 May 2024 09:22:42 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Pipelines/Authentication-to-read-data-from-Lakehouse-using-ABFS-path-and/m-p/3923286#M3374</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2024-05-16T09:22:42Z</dc:date>
    </item>
    <item>
      <title>Re: Authentication to read data from Lakehouse using ABFS path and python/spark code</title>
      <link>https://community.fabric.microsoft.com/t5/Pipelines/Authentication-to-read-data-from-Lakehouse-using-ABFS-path-and/m-p/3924900#M3391</link>
      <description>&lt;P&gt;Hi&amp;nbsp;Anonymous&lt;/a&gt;, I'm using vscode + spark(docker) to run the code. I found the problem, it was my firewall blocking, so here is the code to read a file outside a Microsoft service:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="python"&gt;from pyspark.sql import SparkSession

spark = (SparkSession.builder.config("spark.jars.packages", "org.apache.hadoop:hadoop-azure:3.3.1")
         .appName("Fabric").getOrCreate())

spark.conf.set("fs.azure.account.auth.type", "OAuth")
spark.conf.set("fs.azure.account.oauth.provider.type", "org.apache.hadoop.fs.azurebfs.oauth2.ClientCredsTokenProvider")
spark.conf.set("fs.azure.account.oauth2.client.id", service_principal_id)
spark.conf.set("fs.azure.account.oauth2.client.secret", service_principal_password)
spark.conf.set("fs.azure.account.oauth2.client.endpoint", f"https://login.microsoftonline.com/{tenant_id}/oauth2/token")
spark.conf.set("spark.sql.execution.arrow.pyspark.enabled", "true")
spark.conf.set("spark.sql.files.ignoreCorruptFiles", "true")

table_name = ''

df = spark.read.format("parquet").load(f"abfss://{workspace_name}@onelake.dfs.fabric.microsoft.com/{lakehouse_name}.Lakehouse/Tables/{table_name}/*.parquet")

df.show()&lt;/LI-CODE&gt;</description>
      <pubDate>Thu, 16 May 2024 18:50:22 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Pipelines/Authentication-to-read-data-from-Lakehouse-using-ABFS-path-and/m-p/3924900#M3391</guid>
      <dc:creator>antoniofarias</dc:creator>
      <dc:date>2024-05-16T18:50:22Z</dc:date>
    </item>
  </channel>
</rss>

