Overview
Felt’s custom SQL query feature lets you write and execute SQL queries directly against your database, enabling you to filter and manipulate your spatial data before visualizing it on your map. It gives you full control over how your data is displayed, ensuring your maps are tailored to meet your specific analysis needs. Whether you're refining data or creating complex visualizations, Felt makes it easy to seamlessly integrate your custom queries with your mapping workflow.
Set up
First, connect the data source of your choice. Not sure how? No worries—check out the detailed instructions here. Once you're connected, you’re good to go and can start writing your custom SQL queries.
Writing SQL Queries
Â
- Go to your Library and find your data source in the left column under the Sources heading.
- Select the source you want to use for your SQL query.
- After selecting the source, click the
SQL
icon in the top-right corner of the Library window to open the query editor.
- The SQL query window will open, allowing you to write SQL statements in the code editor. The editor also provides suggestions for table and column names based on your database schema.
- Click
Run Preview
to execute your query. Felt will display a preview of the resulting data in the Preview window.
- Click
Create Layer
in the bottom-right corner of the Preview window to add your data to the map.
- A new layer will be added to your map and you can start browsing your data and styling your map.
Debugging SQL Queries
- If your query isn’t valid, the
Run Preview
button will display a!
to indicate an error.
- Hover over the
Run
Preview
button to see a popup with helpful hints about potential issues in your query.
- Fixing the syntax error in your query will remove the
!
.
- If your query doesn’t generate a preview, an error message will appear in the Preview window with details to help you debug the issue. Adjust your query and try again.
Â
Other Key Features
See a layer’s query
To view the query used to generate a layer, click the
Data
heading in the layer window. Then, click the Source
name to open a SQL query window showing the query.Â
Â