👩‍💻

SQL Queries

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.
📢
This feature is only available to customers on the Enterprise plan. To upgrade, contact sales.

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

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

Debugging SQL Queries

  1. If your query isn’t valid, the Run Preview button will display a ! to indicate an error.
  1. Hover over the Run Preview button to see a popup with helpful hints about potential issues in your query.
  1. Fixing the syntax error in your query will remove the !.
  1. 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.
 
 

Build off of an existing query

Already purchased? Sign in here.