<?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: Error Connecting to Delta Share in Data Engineering</title>
    <link>https://community.fabric.microsoft.com/t5/Data-Engineering/Error-Connecting-to-Delta-Share/m-p/4136142#M3931</link>
    <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="763422" data-lia-user-login="jjaeger94" class="lia-mention lia-mention-user"&gt;jjaeger94&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I think I found the solution here. In your compute you need to go to the Advanced settings in the configuration tab.&lt;BR /&gt;Spark &amp;gt; Spark config&lt;/P&gt;&lt;P&gt;There you can enter some advanced settings. You need to add this:&lt;/P&gt;&lt;P&gt;&lt;FONT face="courier new,courier"&gt;&lt;SPAN&gt;spark.databricks.delta.formatCheck.enabled false&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;other than that have the python module installed in the libraries tab in the compute via PyPi:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="courier new,courier"&gt;&lt;SPAN&gt;delta-sharing&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;The &lt;STRONG&gt;config.share&lt;/STRONG&gt; file should be added in your &lt;STRONG&gt;dbfs directory&lt;/STRONG&gt; so that spark will be able to accesss it.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This is the python script I am using to get the data from a deltashare using the config.share file:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="python"&gt;config_share_path = '/dbfs/FileStore/deltashare/config.share'
import delta_sharing

# Point to the profile file. It can be a file on the local file system or a file on a remote storage.
profile_path = config_share_path

# For spark to read it, the config.share path needs to be in a different format!!
profile_spark_path = config_share_path.replace("/dbfs","dbfs:")

# Create a SharingClient.
client = delta_sharing.SharingClient(profile_path)

# List all shared tables.
# client.list_all_tables()

table_name = "YourTableName"
table = [table for table in client.list_all_tables() if table.name == table_name][0]

# Create a url to access a shared table.
table_url = profile_spark_path + f"#{table.share}.{table.schema}.{table.name}"

# creating spark dataframe
sparkDataFrame = delta_sharing.load_as_spark(table_url)

# display spark dataframe
display(sparkDataFrame.head(100))&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Let me know if this works for you! &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;</description>
    <pubDate>Thu, 05 Sep 2024 20:05:01 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2024-09-05T20:05:01Z</dc:date>
    <item>
      <title>Error Connecting to Delta Share</title>
      <link>https://community.fabric.microsoft.com/t5/Data-Engineering/Error-Connecting-to-Delta-Share/m-p/4002429#M2635</link>
      <description>&lt;P&gt;I get the following error when trying to connect to a Databricks Delta Share using a Notebook:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;Failed to find the data source: deltaSharing. Please find packages at `&lt;A href="https://spark.apache.org/third-party-projects.html" target="_blank" rel="noopener"&gt;https://spark.apache.org/third-party-projects.html&lt;/A&gt;`.&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Using this code:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="python"&gt;shared_df = delta_sharing.load_as_spark(table_url)&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I know the connection works because I can pull metadata with:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="python"&gt;client = delta_sharing.SharingClient(share_file_path)

client.list_all_tables()&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Furthermore, load_as_pandas works.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;What is causing it to fail when loading as a Spark dataframe?&lt;/P&gt;</description>
      <pubDate>Thu, 20 Jun 2024 15:43:29 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Data-Engineering/Error-Connecting-to-Delta-Share/m-p/4002429#M2635</guid>
      <dc:creator>jjaeger94</dc:creator>
      <dc:date>2024-06-20T15:43:29Z</dc:date>
    </item>
    <item>
      <title>Re: Error Connecting to Delta Share</title>
      <link>https://community.fabric.microsoft.com/t5/Data-Engineering/Error-Connecting-to-Delta-Share/m-p/4003854#M2645</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="763422" data-lia-user-login="jjaeger94" class="lia-mention lia-mention-user"&gt;jjaeger94&lt;/a&gt;&amp;nbsp;&lt;BR /&gt;Thanks for using Fabric Community.&lt;BR /&gt;Can you please send me the screenshot of the error along with the complete code?&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;Thanks&lt;/P&gt;</description>
      <pubDate>Fri, 21 Jun 2024 10:19:38 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Data-Engineering/Error-Connecting-to-Delta-Share/m-p/4003854#M2645</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2024-06-21T10:19:38Z</dc:date>
    </item>
    <item>
      <title>Re: Error Connecting to Delta Share</title>
      <link>https://community.fabric.microsoft.com/t5/Data-Engineering/Error-Connecting-to-Delta-Share/m-p/4004213#M2648</link>
      <description>&lt;P&gt;&lt;SPAN class=""&gt;Thank you for reaching out.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN class=""&gt;Here is the code:&lt;/SPAN&gt;&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;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN class=""&gt;Here is the error:&lt;/SPAN&gt;&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;The following code loading as a pandas dataframe works, so I know the connection to the config file is not a problem and that the table exists:&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>Fri, 21 Jun 2024 13:48:11 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Data-Engineering/Error-Connecting-to-Delta-Share/m-p/4004213#M2648</guid>
      <dc:creator>jjaeger94</dc:creator>
      <dc:date>2024-06-21T13:48:11Z</dc:date>
    </item>
    <item>
      <title>Re: Error Connecting to Delta Share</title>
      <link>https://community.fabric.microsoft.com/t5/Data-Engineering/Error-Connecting-to-Delta-Share/m-p/4004483#M2650</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="763422" data-lia-user-login="jjaeger94" class="lia-mention lia-mention-user"&gt;jjaeger94&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The best course of action is to open a support ticket and have our support team take a closer look at it. Please reach out to our support team using this:&amp;nbsp;&lt;A href="https://support.fabric.microsoft.com/en-IN/support/" target="_blank" rel="nofollow noopener noreferrer"&gt;https://support.fabric.microsoft.com/en-IN/support/&lt;/A&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;so they can conduct a more thorough investigation into why this is happening.&lt;/P&gt;
&lt;P&gt;After creating a support ticket, please provide the ticket number to help us track and gather more information.&lt;/P&gt;
&lt;P&gt;Hope this helps. Please let us know if you have any other queries.&lt;/P&gt;</description>
      <pubDate>Fri, 21 Jun 2024 16:54:47 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Data-Engineering/Error-Connecting-to-Delta-Share/m-p/4004483#M2650</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2024-06-21T16:54:47Z</dc:date>
    </item>
    <item>
      <title>Re: Error Connecting to Delta Share</title>
      <link>https://community.fabric.microsoft.com/t5/Data-Engineering/Error-Connecting-to-Delta-Share/m-p/4134157#M3911</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="763422" data-lia-user-login="jjaeger94" class="lia-mention lia-mention-user"&gt;jjaeger94&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Did you ever manage to solve this? I'm having the same issue. Loading as a pandas dataframe works indeed, but not loading as a spark dataframe. Seems like a Microsoft issue.&lt;/P&gt;</description>
      <pubDate>Wed, 04 Sep 2024 21:53:22 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Data-Engineering/Error-Connecting-to-Delta-Share/m-p/4134157#M3911</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2024-09-04T21:53:22Z</dc:date>
    </item>
    <item>
      <title>Re: Error Connecting to Delta Share</title>
      <link>https://community.fabric.microsoft.com/t5/Data-Engineering/Error-Connecting-to-Delta-Share/m-p/4136006#M3927</link>
      <description>&lt;P&gt;No, I have been unable to resolve this and have tried numerous methods.&lt;/P&gt;</description>
      <pubDate>Thu, 05 Sep 2024 17:47:07 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Data-Engineering/Error-Connecting-to-Delta-Share/m-p/4136006#M3927</guid>
      <dc:creator>jjaeger94</dc:creator>
      <dc:date>2024-09-05T17:47:07Z</dc:date>
    </item>
    <item>
      <title>Re: Error Connecting to Delta Share</title>
      <link>https://community.fabric.microsoft.com/t5/Data-Engineering/Error-Connecting-to-Delta-Share/m-p/4136142#M3931</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="763422" data-lia-user-login="jjaeger94" class="lia-mention lia-mention-user"&gt;jjaeger94&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I think I found the solution here. In your compute you need to go to the Advanced settings in the configuration tab.&lt;BR /&gt;Spark &amp;gt; Spark config&lt;/P&gt;&lt;P&gt;There you can enter some advanced settings. You need to add this:&lt;/P&gt;&lt;P&gt;&lt;FONT face="courier new,courier"&gt;&lt;SPAN&gt;spark.databricks.delta.formatCheck.enabled false&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;other than that have the python module installed in the libraries tab in the compute via PyPi:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="courier new,courier"&gt;&lt;SPAN&gt;delta-sharing&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;The &lt;STRONG&gt;config.share&lt;/STRONG&gt; file should be added in your &lt;STRONG&gt;dbfs directory&lt;/STRONG&gt; so that spark will be able to accesss it.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This is the python script I am using to get the data from a deltashare using the config.share file:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="python"&gt;config_share_path = '/dbfs/FileStore/deltashare/config.share'
import delta_sharing

# Point to the profile file. It can be a file on the local file system or a file on a remote storage.
profile_path = config_share_path

# For spark to read it, the config.share path needs to be in a different format!!
profile_spark_path = config_share_path.replace("/dbfs","dbfs:")

# Create a SharingClient.
client = delta_sharing.SharingClient(profile_path)

# List all shared tables.
# client.list_all_tables()

table_name = "YourTableName"
table = [table for table in client.list_all_tables() if table.name == table_name][0]

# Create a url to access a shared table.
table_url = profile_spark_path + f"#{table.share}.{table.schema}.{table.name}"

# creating spark dataframe
sparkDataFrame = delta_sharing.load_as_spark(table_url)

# display spark dataframe
display(sparkDataFrame.head(100))&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Let me know if this works for you! &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 05 Sep 2024 20:05:01 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Data-Engineering/Error-Connecting-to-Delta-Share/m-p/4136142#M3931</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2024-09-05T20:05:01Z</dc:date>
    </item>
    <item>
      <title>Re: Error Connecting to Delta Share</title>
      <link>https://community.fabric.microsoft.com/t5/Data-Engineering/Error-Connecting-to-Delta-Share/m-p/4136149#M3932</link>
      <description>&lt;P&gt;I'm sorry, is this in Fabric? I am not seeing any of these options.&lt;/P&gt;</description>
      <pubDate>Thu, 05 Sep 2024 20:12:57 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Data-Engineering/Error-Connecting-to-Delta-Share/m-p/4136149#M3932</guid>
      <dc:creator>jjaeger94</dc:creator>
      <dc:date>2024-09-05T20:12:57Z</dc:date>
    </item>
    <item>
      <title>Re: Error Connecting to Delta Share</title>
      <link>https://community.fabric.microsoft.com/t5/Data-Engineering/Error-Connecting-to-Delta-Share/m-p/4202257#M4359</link>
      <description>&lt;P&gt;The solution was to set up an environment with the delta_sharing library and the following Spark configuration.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;runtime_version: '1.3'&lt;BR /&gt;spark_conf:&lt;BR /&gt;- spark.jars.packages: &amp;gt;-&lt;BR /&gt;org.apache.hadoop:hadoop-azure:3.3.1,io.delta:delta-core_2.12:2.2.0,io.delta:delta-sharing-spark_2.12:3.1.0&lt;BR /&gt;- spark.sql.extensions: io.delta.sql.DeltaSparkSessionExtension&lt;BR /&gt;- spark.sql.catalog.spark_catalog: org.apache.spark.sql.delta.catalog.DeltaCatalog&lt;/P&gt;</description>
      <pubDate>Mon, 30 Sep 2024 18:24:52 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Data-Engineering/Error-Connecting-to-Delta-Share/m-p/4202257#M4359</guid>
      <dc:creator>jjaeger94</dc:creator>
      <dc:date>2024-09-30T18:24:52Z</dc:date>
    </item>
  </channel>
</rss>

