<?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 import error with typing_extensions, issue with pyiceberg and pydantic in Data Engineering</title>
    <link>https://community.databricks.com/t5/data-engineering/import-error-with-typing-extensions-issue-with-pyiceberg-and/m-p/86985#M37362</link>
    <description>&lt;P&gt;Hello All,&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;I am currently working in a Databricks environment where I am trying to use the `pyiceberg` library to interact with Iceberg table metadata directly in Unity catalog enabled. However, I'm encountering an issue with package compatibility related to the `typing_extensions` module. Specifically, when I try to import `StaticTable` from `pyiceberg`, I receive the following error:&amp;nbsp;ImportError: cannot import name 'deprecated' from 'typing_extensions' (/databricks/python/lib/python3.10/site-packages/typing_extensions.py)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Databricks Runtime Version: 14.3 LTS (includes Apache Spark 3.5.0, Scala 2.12)&lt;BR /&gt;Installed Packages: pyiceberg, pydantic, typing_extensions&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Attempted to run the following code:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;from pyiceberg.table import StaticTable&lt;BR /&gt;&lt;BR /&gt;# Replaced Iceberg metadata path&lt;BR /&gt;iceberg_table = StaticTable.from_metadata(location)&lt;BR /&gt;data = iceberg_table.scan().to_pandas()&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;I would appreciate any guidance on how to resolve this compatibility issue, or if there is an alternative method for interacting with Iceberg metadata within Databricks that avoids this error.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Sat, 31 Aug 2024 01:40:46 GMT</pubDate>
    <dc:creator>xecel</dc:creator>
    <dc:date>2024-08-31T01:40:46Z</dc:date>
    <item>
      <title>import error with typing_extensions, issue with pyiceberg and pydantic</title>
      <link>https://community.databricks.com/t5/data-engineering/import-error-with-typing-extensions-issue-with-pyiceberg-and/m-p/86985#M37362</link>
      <description>&lt;P&gt;Hello All,&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;I am currently working in a Databricks environment where I am trying to use the `pyiceberg` library to interact with Iceberg table metadata directly in Unity catalog enabled. However, I'm encountering an issue with package compatibility related to the `typing_extensions` module. Specifically, when I try to import `StaticTable` from `pyiceberg`, I receive the following error:&amp;nbsp;ImportError: cannot import name 'deprecated' from 'typing_extensions' (/databricks/python/lib/python3.10/site-packages/typing_extensions.py)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Databricks Runtime Version: 14.3 LTS (includes Apache Spark 3.5.0, Scala 2.12)&lt;BR /&gt;Installed Packages: pyiceberg, pydantic, typing_extensions&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Attempted to run the following code:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;from pyiceberg.table import StaticTable&lt;BR /&gt;&lt;BR /&gt;# Replaced Iceberg metadata path&lt;BR /&gt;iceberg_table = StaticTable.from_metadata(location)&lt;BR /&gt;data = iceberg_table.scan().to_pandas()&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;I would appreciate any guidance on how to resolve this compatibility issue, or if there is an alternative method for interacting with Iceberg metadata within Databricks that avoids this error.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 31 Aug 2024 01:40:46 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/import-error-with-typing-extensions-issue-with-pyiceberg-and/m-p/86985#M37362</guid>
      <dc:creator>xecel</dc:creator>
      <dc:date>2024-08-31T01:40:46Z</dc:date>
    </item>
    <item>
      <title>Re: import error with typing_extensions, issue with pyiceberg and pydantic</title>
      <link>https://community.databricks.com/t5/data-engineering/import-error-with-typing-extensions-issue-with-pyiceberg-and/m-p/87124#M37386</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.databricks.com/t5/user/viewprofilepage/user-id/118425"&gt;@xecel&lt;/a&gt;, How are you doing today?&lt;/P&gt;&lt;P&gt;As per my understanding,&amp;nbsp;Ensure you're using a compatible version of &lt;STRONG&gt;typing_extensions&lt;/STRONG&gt;&amp;nbsp;by installing a specific version like 4.4.0 that might work with &lt;STRONG&gt;pyiceberg&lt;/STRONG&gt;. Try &lt;STRONG&gt;reinstalling the libraries&lt;/STRONG&gt; (&lt;STRONG&gt;pyiceberg&lt;/STRONG&gt;&amp;nbsp;and&amp;nbsp;&lt;STRONG&gt;typing_extensions&lt;/STRONG&gt;&amp;nbsp;) to ensure compatibility. Check the &lt;STRONG&gt;release notes or GitHub issues&lt;/STRONG&gt; for&amp;nbsp;&lt;STRONG&gt;pyiceberg&lt;/STRONG&gt;&amp;nbsp;to see if there are any updates or known issues with your Databricks runtime version. If the problem persists, consider using &lt;STRONG&gt;Databricks APIs or Spark SQL&lt;/STRONG&gt; to interact with Iceberg tables as an alternative. Lastly, think about setting up a &lt;STRONG&gt;custom Python environment&lt;/STRONG&gt; to better control library versions.&lt;/P&gt;&lt;P&gt;Just give a try and let me know if it works.&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Brahma&lt;/P&gt;</description>
      <pubDate>Mon, 02 Sep 2024 03:23:31 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/import-error-with-typing-extensions-issue-with-pyiceberg-and/m-p/87124#M37386</guid>
      <dc:creator>Brahmareddy</dc:creator>
      <dc:date>2024-09-02T03:23:31Z</dc:date>
    </item>
  </channel>
</rss>

