Advanced geospatial analytics within Snowflake
Perform scalable spatial analysis on Snowflake hosted data using CARTO’s Analytics Toolbox

Introducing the CARTO Analytics Toolbox for Snowflake
Our Analytics Toolbox is a suite of functions that enhances the geospatial capabilities available in Snowflake. The Analytics Toolbox runs natively within Snowflake’s cloud data platform, leveraging its computational power and scalability and avoiding the need for time consuming ETL processes.

A powerful toolbox to perform scalable spatial analyses
The Analytics Toolbox gives you access to an ever-growing number of geospatial modules to process and analyze your spatial data and transform it into powerful insights.

Unlock advanced spatial functions in Snowflake
Incorporate functions seamlessly into your SQL code to solve common spatial problems, such as clustering.
WITH data AS(
SELECT geog
FROM sfcarto.public.starbucks_locations_usa
WHERE geog IS NOT null
ORDER BY id
),
clustered_points AS
(
SELECT sfcarto.clustering.ST_CLUSTERKMEANS(ARRAY_AGG(ST_ASGEOJSON(geog)::STRING), 10) AS cluster_arr
FROM data
)
SELECT GET(VALUE, 'cluster') AS cluster, TO_GEOGRAPHY(GET(VALUE, 'geom')) AS geom
FROM clustered_points, lateral FLATTEN(input => cluster_arr)
