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.

<aside> 📢

This feature is only available to customers on the Enterprise plan. To upgrade, contact sales.

</aside>

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

add from sql.mp4

  1. Go to your Library and find your data source in the left column under the Sources heading.
  2. Select the source you want to use for your SQL query.
  3. After selecting the source, click the SQL icon in the top-right corner of the Library window to open the query editor.
  4. 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.
  5. Click Run Preview to execute your query. Felt will display a preview of the resulting data in the Preview window.
  6. Click Create Layer in the bottom-right corner of the Preview window to add your data to the map.
  7. A new layer will be added to your map and you can start browsing your data and styling your map.

Debugging SQL Queries

debugging.mp4

  1. If your query isn’t valid, the Run Preview button will display a ! to indicate an error.
  2. Hover over the **Run** **Preview** button to see a popup with helpful hints about potential issues in your query.
  3. Fixing the syntax error in your query will remove the !.