Running queries from Builder
Once you have gained access to the Analytics Toolbox through the Snowflake Data Marketplace (see Getting Access for details), you can create custom SQL layers in Builder that make use of any of the available spatial functions.
To get started, let’s run a simple example query to cluster a set of points using the
ST_CLUSTERKMEANS function from the clustering module.
- Click on the Add source from button in Builder, that can be found at the bottom left of the screen.
- Select the second tab Custom Query (SQL) and pick the Snowflake connection that you will use to run the query. Please make sure this connection has access to the Analytics Toolbox database.
- Click on Add source. A SQL console will be displayed.
- Copy and paste the following query:
Run the query. This query computes eight clusters from the points of the
starbucks_locations_usatable, provided as sample data within the Analytics Toolbox. As a result, each point is assigned a
Style the layer by the