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
Most of the time dbplyr is very good about letting functions known to the database backend (e.g. duckdb with spatial extension), to just "pass through", e.g. if tbl is a lazy table to a duckdb extension, we can do:
But in this particular case, DuckDB requires an extra argument for working with EPSG:4326, as described in the docs. We want the SQL query to render as:
SELECT ST_TRANSFORM(geom, 'EPSG:4326', 'EPSG:3857', always_xy := true) AS geom
But I cannot see how to get the always_xy := true part to render properly. E.g. if we try this:
Most of the time dbplyr is very good about letting functions known to the database backend (e.g. duckdb with spatial extension), to just "pass through", e.g. if
tbl
is a lazy table to a duckdb extension, we can do:because
st_transform()
is understood by duckdb.(Full reprex here: cboettig/duckdbfs#34).
But in this particular case, DuckDB requires an extra argument for working with EPSG:4326, as described in the docs. We want the SQL query to render as:
But I cannot see how to get the
always_xy := true
part to render properly. E.g. if we try this:dbplyr gives us this kinda nonsense SQL instead:
The docs just suggest that "unknown functions translate "as is" but that does not seem to be what happens here.
Thanks!
The text was updated successfully, but these errors were encountered: