- Reading Iceberg v2 and v3 tables.
- Creating tables and inserting rows through a catalog-linked database.
- Iceberg v3
geometrycolumns, which Snowflake maps to its nativeGEOMETRYtype.
Raster columns aren’t supported. Raster is a Wherobots-specific type that the Iceberg specification doesn’t
define, so Snowflake can’t interpret raster values. Query raster data in Wherobots instead.
Before you start
Ensure that you have the following:Wherobots Requirements
Wherobots Requirements
- A Wherobots API key that you created for your own user, not one created for a service principal.
- Your Wherobots User ID, shown in Settings > Details. It must belong to the same user as the API key.
- Access to the Managed catalog you want to connect. Foreign catalogs, such as Databricks Unity Catalog catalogs, aren’t supported.
Snowflake Requirements
Snowflake Requirements
- A role with the
CREATE INTEGRATIONandCREATE DATABASEprivileges on the account. By default, onlyACCOUNTADMINcan grantCREATE INTEGRATION. USAGEon a warehouse.
Connect Snowflake to a Wherobots catalog
1
Find your catalog ID
List the catalogs you can access with your API key. Note the
id of the catalog you want to connect.
Its type must be MANAGED:2
Create the catalog integration
In Snowflake, run the following statement. Replace the placeholders with your catalog ID, your
Wherobots User ID, your API key, and the catalog database (namespace) you want Snowflake to use by default.
OAUTH_CLIENT_ID is your Wherobots User ID, and OAUTH_CLIENT_SECRET is an API key that belongs to
that same user. Snowflake exchanges them for a short-lived access token on every connection.3
Verify the connection
"success": true, and the others list the databases and tables in your
Wherobots catalog.Read a Wherobots table
To read individual tables, register each one in a Snowflake database and schema of your choice:Read and write through a catalog-linked database
A catalog-linked database mirrors one or more Wherobots databases in Snowflake. Tables are discovered automatically, and you can create tables and insert rows that Wherobots can read back.executionState stays RUNNING. The first sync has succeeded
when lastLinkAttemptStartTime shows a timestamp, failureDetails is empty, and SHOW SCHEMAS lists your
Wherobots database. If failureDetails isn’t empty, fix the reported error before continuing.
Wherobots database and table names are lowercase, so put them in double quotes:
Work with geometry
Wherobots stores a geometry column in one of two ways, depending on how the column was created. RunDESCRIBE TABLE in Snowflake to see which one a column uses:
Binary geometry columns can be encoded as EWKB or WKB. EWKB includes the SRID, so
TO_GEOMETRY(geom) keeps it.
WKB has no SRID, so TO_GEOMETRY(geom) returns a geometry with SRID 0. If ST_SRID(TO_GEOMETRY(geom)) returns 0,
pass the table’s SRID as the second argument instead:GEOMETRY column and ICEBERG_VERSION = 3:
Troubleshooting
Catalog integration does not exist or not enabled
Catalog integration does not exist or not enabled
The
CREATE CATALOG INTEGRATION statement didn’t run, or ran under a different role. Run
SHOW CATALOG INTEGRATIONS with the role you use for queries.
