You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Parameterized queries were recently added to Spark and allow for some really clean syntax when shifting from the Python API to the SQL API. We should consider adding this interface to Sedona.
Parameterized queries were recently added to Spark and allow for some really clean syntax when shifting from the Python API to the SQL API. We should consider adding this interface to Sedona.
Status quo
Create a geometry object for Minnesota:
Create a DataFrame:
Create a temporary view:
Run a query with a f-string:
How to make this more concise with a parameterized query
This could be nicer with a parameterized query:
The parameterized query saves you from creating the temporary view and using f-strings.
It would be great if the parameters were also sanitized to prevent SQL injection vulnerabilities.
Another parameterized query example
This can be even cooler. Assume Minnesota is a geometry object as follows:
Then, we can pass the geometry object directly in the parameterized query:
The text was updated successfully, but these errors were encountered: