MrPowers opened a new issue, #80:
URL: https://github.com/apache/sedona-db/issues/80
Here's how to make a view: `cities.to_view("cities")`.
Here's the error if a view already exists:
```
SedonaError Traceback (most recent call last)
Cell In[15], line 1
----> 1 cities.to_view("cities")
2 countries.to_view("countries")
File
[/opt/miniconda3/lib/python3.12/site-packages/sedonadb/dataframe.py:175](http://localhost:8888/opt/miniconda3/lib/python3.12/site-packages/sedonadb/dataframe.py#line=174),
in DataFrame.to_view(self, name, overwrite)
151 def to_view(self, name: str, overwrite: bool = False):
152 """Create a view based on the query represented by this object
153
154 Registers this logical plan as a named view with the underlying
context
(...)
173
174 """
--> 175 self._impl.to_view(self._ctx, name, overwrite)
SedonaError: The table cities already exists
```
I'm currently running this:
```python
sd.sql("drop view if exists cities")
cities.to_view("cities")
```
Maybe we can support this syntax:
```python
cities.to_view("cities", mode="replace")
```
--
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]