MrPowers commented on code in PR #238:
URL: https://github.com/apache/sedona-db/pull/238#discussion_r2479635530


##########
docs/delta-lake.md:
##########
@@ -0,0 +1,202 @@
+<!---
+  Licensed to the Apache Software Foundation (ASF) under one
+  or more contributor license agreements.  See the NOTICE file
+  distributed with this work for additional information
+  regarding copyright ownership.  The ASF licenses this file
+  to you under the Apache License, Version 2.0 (the
+  "License"); you may not use this file except in compliance
+  with the License.  You may obtain a copy of the License at
+
+    http://www.apache.org/licenses/LICENSE-2.0
+
+  Unless required by applicable law or agreed to in writing,
+  software distributed under the License is distributed on an
+  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+  KIND, either express or implied.  See the License for the
+  specific language governing permissions and limitations
+  under the License.
+-->
+
+# SedonaDB + Delta Lake
+
+This page shows how to read and write Delta Lake tables with SedonaDB.
+
+Make sure you run `pip install deltalake` to run the cells in this notebook.
+
+
+```python
+from deltalake import write_deltalake, DeltaTable
+import sedona.db
+
+sd = sedona.db.connect()
+```
+
+Read in a GeoParquet dataset into a SedonaDB DataFrame.
+
+
+```python
+countries = sd.read_parquet(
+    
"https://raw.githubusercontent.com/geoarrow/geoarrow-data/v0.2.0/natural-earth/files/natural-earth_countries_geo.parquet";
+)
+```
+
+## Create a Delta Lake table
+
+Now write the DataFrame to a Delta Lake table.  Notice that you must convert 
the geometry column to Well-Known Text (WKT) before writing to the Delta table.
+
+Delta Lake does not support geometry columns.
+
+
+```python
+countries.to_view("countries", True)
+df = sd.sql(
+    "select name, continent, ST_AsText(geometry) as geometry_wkt from 
countries"

Review Comment:
   I added a section with `ST_AsBinary()`.  Good idea.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to