Skip to content

Transform with SQL

SQL Transform runs DuckDB SQL against the current Source. It is a power-user alternative to Basic Transform operations, not a DuckDB database server.

The query result continues through Convert and Destination like any other GeoJibe dataset.

Before you start

Inspect the Source first. SQL Transform is available for vector and tabular datasets, not rasters.

A Transform step is either Basic or SQL, not both. Switching modes does not convert Basic operations into SQL.

Input relation

This version exposes one input table:

source

Example:

SELECT *
FROM source
WHERE population > 100000

Starter query when SQL mode is empty:

SELECT *
FROM source

Other useful patterns:

SELECT * FROM source WHERE population > 100000
SELECT *, population / area AS density FROM source

Geometry

Use the geometry field name shown in Inspect (geometry, geom, and so on). SELECT * FROM source keeps geometry when it is present.

If the SELECT list includes geometry, the result is spatial: Data and Map preview.

If the SELECT list omits geometry, the result is non-spatial: Data only.

SQL Transform does not invent a CRS. When geometry is present but CRS is unknown, Map preview uses the existing Select CRS behavior.

Spatial functions

Spatial functions such as ST_Area and ST_Intersects are available when the processing runtime includes DuckDB Spatial. They run offline from the bundled extension. SQL cannot download extensions.

SELECT
    name,
    geometry,
    ST_Area(geometry) AS area
FROM source

Network and other databases

SQL cannot reach HTTP, HTTPS, S3, or remote databases. GeoJibe connectors load Source data first. The query only sees source.

ATTACH, INSTALL, COPY to arbitrary paths, and similar administration statements are not allowed.

Jobs

Saved Jobs store the SQL text. Run Now and scheduled runs execute that SQL. They do not call AI.

See also