<?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: Read Geojson file using Sedona Context in Databricks in Data Engineering</title>
    <link>https://community.databricks.com/t5/data-engineering/read-geojson-file-using-sedona-context-in-databricks/m-p/93232#M38658</link>
    <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.databricks.com/t5/user/viewprofilepage/user-id/124500"&gt;@Kunal_Mishra&lt;/a&gt;&amp;nbsp;,&lt;BR /&gt;&lt;BR /&gt;The error you are experiencing with Sedona when trying to read a GeoJSON file in Databricks (java.lang.NoSuchMethodError) often indicates a compatibility issue between the Spark version you're using and the Sedona library.&lt;/P&gt;&lt;P&gt;Sedona has specific compatibility requirements with Apache Spark. You need to ensure that the versions of Spark, Scala, and Sedona you are using are all compatible. For example:&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;sedona-spark-shaded-3.4_2.12-1.6.1.jar is compatible with Spark 3.4 and Scala 2.12.&lt;/LI&gt;&lt;LI&gt;sedona-spark-shaded-3.5_2.12-1.6.1.jar is compatible with Spark 3.5 and Scala 2.12.&lt;BR /&gt;&lt;BR /&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;Could you check you Databricks Runtime and make sure it is compatible with the sedona version you are using.&lt;BR /&gt;Here is the link to check DBR:&amp;nbsp;&lt;BR /&gt;&lt;A href="https://docs.databricks.com/en/release-notes/runtime/index.html" target="_blank"&gt;https://docs.databricks.com/en/release-notes/runtime/index.html&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Wed, 09 Oct 2024 06:41:36 GMT</pubDate>
    <dc:creator>filipniziol</dc:creator>
    <dc:date>2024-10-09T06:41:36Z</dc:date>
    <item>
      <title>Read Geojson file using Sedona Context in Databricks</title>
      <link>https://community.databricks.com/t5/data-engineering/read-geojson-file-using-sedona-context-in-databricks/m-p/93228#M38657</link>
      <description>&lt;P&gt;Hi Everyone,&lt;/P&gt;&lt;P&gt;I am trying to read a geojson file in Databricks using the following syntax as mentioned in the apache sedona official docs&amp;nbsp;&lt;A href="https://sedona.apache.org/latest-snapshot/tutorial/sql/#__tabbed_14_3" target="_blank" rel="noopener"&gt;Load Geojson Data &lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;I am using Sedon 1.6.1 Version which supports this feature but i am getting an error as mentioned below&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&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;df = sedona.read.format("geojson").option("multiLine", "true").load("PATH/TO/MYFILE.json") .selectExpr("explode(features) as features") # Explode the envelope to get one feature per row. .select("features.*") # Unpack the features struct. .withColumn("prop0", f.expr("properties['prop0']")).drop("properties").drop("type")&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp;Error :&lt;/STRONG&gt;&lt;BR /&gt;&lt;SPAN&gt;Caused by: java.lang.NoSuchMethodError: org.apache.spark.sql.execution.datasources.json.JsonDataSource.readFile(Lorg/apache/hadoop/conf/Configuration;Lorg/apache/spark/sql/execution/datasources/PartitionedFile;Lorg/apache/spark/sql/catalyst/json/JacksonParser;Lorg/apache/spark/sql/types/StructType;)Lscala/collection/Iterator;&lt;BR /&gt;&lt;/SPAN&gt;&lt;BR /&gt;I am using the following Jars and Libraries as mentioned below&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;geotools-wrapper-1.6.1-28.2.jar&lt;/LI&gt;&lt;LI&gt;&lt;A class="" href="https://issues.apache.org/jira/browse/SEDONA-spark-shaded-3" target="_blank" rel="noopener noreferrer nofollow"&gt;sedona-spark-shaded-3&lt;/A&gt;.4_2.12-1.6.1.jar (Have tried with&amp;nbsp;&lt;A class="" href="https://issues.apache.org/jira/browse/SEDONA-spark-shaded-3" target="_blank" rel="noopener noreferrer nofollow"&gt;sedona-spark-shaded-3&lt;/A&gt;.5_2.12-1.6.1.jar also)&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;I have installed the following libraries&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;apache-sedona==1.6.1&lt;/LI&gt;&lt;LI&gt;geopandas==0.11.1&lt;/LI&gt;&lt;LI&gt;keplergl==0.3.2&lt;/LI&gt;&lt;LI&gt;pydeck==0.8.0&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;Kindly assist me as to how can i fix this. For now i am using spark context to read the geojson file and it is working but i want to use the feature of sedona since it will reduce the number of steps to extract the Polygon Coordinates.&lt;/P&gt;</description>
      <pubDate>Wed, 09 Oct 2024 06:30:15 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/read-geojson-file-using-sedona-context-in-databricks/m-p/93228#M38657</guid>
      <dc:creator>Kunal_Mishra</dc:creator>
      <dc:date>2024-10-09T06:30:15Z</dc:date>
    </item>
    <item>
      <title>Re: Read Geojson file using Sedona Context in Databricks</title>
      <link>https://community.databricks.com/t5/data-engineering/read-geojson-file-using-sedona-context-in-databricks/m-p/93232#M38658</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.databricks.com/t5/user/viewprofilepage/user-id/124500"&gt;@Kunal_Mishra&lt;/a&gt;&amp;nbsp;,&lt;BR /&gt;&lt;BR /&gt;The error you are experiencing with Sedona when trying to read a GeoJSON file in Databricks (java.lang.NoSuchMethodError) often indicates a compatibility issue between the Spark version you're using and the Sedona library.&lt;/P&gt;&lt;P&gt;Sedona has specific compatibility requirements with Apache Spark. You need to ensure that the versions of Spark, Scala, and Sedona you are using are all compatible. For example:&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;sedona-spark-shaded-3.4_2.12-1.6.1.jar is compatible with Spark 3.4 and Scala 2.12.&lt;/LI&gt;&lt;LI&gt;sedona-spark-shaded-3.5_2.12-1.6.1.jar is compatible with Spark 3.5 and Scala 2.12.&lt;BR /&gt;&lt;BR /&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;Could you check you Databricks Runtime and make sure it is compatible with the sedona version you are using.&lt;BR /&gt;Here is the link to check DBR:&amp;nbsp;&lt;BR /&gt;&lt;A href="https://docs.databricks.com/en/release-notes/runtime/index.html" target="_blank"&gt;https://docs.databricks.com/en/release-notes/runtime/index.html&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 09 Oct 2024 06:41:36 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/read-geojson-file-using-sedona-context-in-databricks/m-p/93232#M38658</guid>
      <dc:creator>filipniziol</dc:creator>
      <dc:date>2024-10-09T06:41:36Z</dc:date>
    </item>
    <item>
      <title>Re: Read Geojson file using Sedona Context in Databricks</title>
      <link>https://community.databricks.com/t5/data-engineering/read-geojson-file-using-sedona-context-in-databricks/m-p/94368#M38888</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.databricks.com/t5/user/viewprofilepage/user-id/117376"&gt;@filipniziol&lt;/a&gt;&amp;nbsp;, I am using the Databricks Runtime compatible with the Sedona version as mentioned in the jar file.&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;DBR Runtime: 14.3 LTS (includes Apache Spark 3.5.0, Scala 2.12)&lt;/LI&gt;&lt;LI&gt;Jar File Used :&amp;nbsp;sedona-spark-shaded-3.5_2.12-1.6.1.jar&lt;/LI&gt;&lt;LI&gt;Cluster : Single User&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;SPAN&gt;&lt;EM&gt;As per the comments in the Apache Sedona github issue page&amp;nbsp;&lt;/EM&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;EM&gt;"the Shared Access cluster on Databricks does not allow Spark DataSourceV2. This will prevent you from using Sedona GeoJSON reader/writer, GeoParquet reader/writer. Until Databricks fixes this limitation, you won't be able to use these data sources on Databricks Shared access cluster."&lt;/EM&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;A href="https://github.com/apache/sedona/issues/1617#issuecomment-2405940397" target="_blank"&gt;https://github.com/apache/sedona/issues/1617#issuecomment-2405940397&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 17 Oct 2024 03:25:49 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/read-geojson-file-using-sedona-context-in-databricks/m-p/94368#M38888</guid>
      <dc:creator>Kunal_Mishra</dc:creator>
      <dc:date>2024-10-17T03:25:49Z</dc:date>
    </item>
  </channel>
</rss>

