Import Data from Cloud storage
Connecting to the Foursquare H3 Hub (Iceberg Catalog)
FSQ Spatial Desktop can connect directly to the Foursquare H3 Hub, a public catalog
of H3-indexed spatial datasets served as Apache Iceberg tables. Once attached, every dataset in the catalog is available to query, join, and visualize alongside your local data.
Prerequisites
Before connecting, you'll need:
- An H3 Hub access token. You can request one from your Foursquare account.
- The DuckDB
iceberg,httpfs,spatial, andh3extensions (installed on first use).
Connecting
Open the SQL Editor and run the following query. Paste your access token into the TOKEN field.
-- Enable access to the H3 Hub Iceberg catalog
INSTALL iceberg;
INSTALL httpfs;
INSTALL h3 FROM community;
INSTALL spatial;
LOAD httpfs;
CREATE OR REPLACE SECRET iceberg_secret (
TYPE ICEBERG,
TOKEN '<YOUR_TOKEN_HERE>'
);
ATTACH 'open_h3' AS open_h3 (
TYPE iceberg,
SECRET iceberg_secret,
ENDPOINT 'https://catalog.h3-hub.foursquare.com/iceberg'
);This installs the required extensions, stores your token as a DuckDB secret, and attaches the H3 Hub catalog under the alias open_h3.
Listing Available Datasets
Once attached, you can browse all available tables:
SELECT table_schema, table_name FROM information_schema.tables WHERE table_catalog = 'open_h3';Each row is a dataset in the H3 Hub (e.g. GridMET Weekly Weather, WorldPop Population, NDVI Vegetation Index).
Querying a Dataset
Reference any table using the open_h3.<schema>.<table> pattern. For example, to preview the GridMET Weekly Weather dataset:
SELECT * FROM open_h3.climatology_lab.gridmet_weekly_h3_8 LIMIT 1000;Saving Data Locally
To copy a subset of an H3 Hub dataset into your project for offline use, wrap the query in CREATE TABLE ... AS:
CREATE TABLE weather_manhattan AS
SELECT *
FROM open_h3."gridmet_weekly_weather"
WHERE h3_cell_to_parent(h3_index, 6) = '862a1072fffffff';The new table lives inside your .spatial project file and can be visualized as an H3 hexagon layer.
Updated about 11 hours ago
