Query Managed DuckDB
Execute spatial SQL queries on your managed DuckDB instance using the built-in query editor or AI assistance.Step 1: Open Query Editor
- Click
Databases
in the left bar of a NikaWorkspace - Select a managed DuckDB from the database list
- Double click or right click to select “Open SQL Query Editor”
- The query interface opens with your database context
Step 2: Open Query Editor
- Click
Files
in the left bar - Right click on a spatial file of your interest to
Copy Path

Step 3: Write SQL Query
Manual SQL Writing
- Type your spatial SQL query in the editor of a NikaWorkspace
- Use spatial functions from DuckDB SQL like
ST_READ()
,ST_AsText()
,ST_DWithin()
- Click “Execute” to run the query

AI-Powered SQL Generation
- [Optional] Select AI model (GPT-4, Claude, etc.)
- Describe your query in natural language
- Click “Generate SQL” button
- AI generates SQL based on your table schema

Step 4: View Results
- Query results display in the results table
- Download CSV for data export
- Add to Map to visualize spatial results (WIP)
AI SQL generation understands your table schema if you mention it with ’/’ trigger and suggests optimal spatial queries for your data.

Get Expert Help
Talk to a Geospatial Expert
Need help with your geospatial projects? Our team of experts is here to assist you with implementation, best practices, and technical support.
Other ways to get help:
- Guides: Use the /guides tab for detailed tutorials
- Community: Ask questions in our community forum
- Support: Send us a support request