Skip to main content

DuckDB_Connection.create_spatial_index

create_spatial_indextablecolumnasreplace_if_present

Group: Database

Documentation

Creates a RTree index on a single column in an existing table.

Arguments

  • table: the table name or a DB_Table to create the index on.
  • column: the name of the column to use as the index.
  • as: the name of the index to create. Defaults to <table>_<column>_INDEX.
  • replace_if_present: if set to True, will replace the index if it already exists.

Returns

A DB_Table referencing the newly created table.