Skip to main content
This page onboards a Snowflake Horizon Catalog table with the StarTree controller REST APIs. Snowflake Horizon exposes Snowflake-managed Iceberg tables over the Iceberg REST protocol, served on the Snowflake account host under /polaris/api/catalog. StarTree reaches it through the generic spec-compliant adapter: catalogType=iceberg-rest, serviceType=rest. Data files must be Parquet.

How Horizon differs from Apache Polaris

Horizon speaks the Polaris REST protocol, but authentication and identifier mapping follow Snowflake’s model, not Polaris’s: Pass the PAT in catalog.iceberg-rest.credential. Don’t use oauthClientSecret for it; that setting doesn’t work with Horizon.

How it works

Onboarding is four calls. Each one feeds the next:
The preview call is the core step. It samples the source, infers a Pinot schema, and returns a ready-to-use table config. Steps 3 and 4 persist its output. After that, the first sync and every later sync run on their own. Track progress with Observability.
Paths are relative to your data-plane base URL: export BASE_URL=https://dp.<data-plane-id>.cp.<region>.startree.cloud/api/pinot.If your cluster requires authentication, add -H "Authorization: Bearer <token>" to every request. The examples omit it for brevity.

Prerequisites

  • The External Table feature enabled, and tiered storage configured on the cluster. Contact StarTree support if unsure.
  • Network access to the controller REST endpoint, plus an Authorization token if your cluster requires auth.
  • A Snowflake account with Horizon Catalog and the target Iceberg table backed by an external volume (S3).
  • A Snowflake service user with a programmatic access token (PAT), a role that can read the table, and a network policy governing the user (see Snowflake setup below).
  • The Snowflake database (used as both warehouse and prefix), the schema (the namespace), and the table to onboard.
  • Read access to the underlying object storage. This connector supports S3-compatible storage for the data files.

Snowflake setup

Run these once in Snowflake (or have an ACCOUNTADMIN do so). Replace the placeholders with your own names.
The ROLE_RESTRICTION role must match the role named in the session:role:<role> scope you configure below, and it must hold the grants from step 1. Without a network policy in effect, ADD PAT fails and the token endpoint later returns 401 unauthorized_client.

Quickstart: onboard a table end-to-end

The whole flow as one script. Steps 1 to 4 below explain each call. Fill in the variables at the top, run the script, and the first sync starts automatically.
Once step 6 exits 0, verify it’s queryable.

Verify it’s queryable

The status endpoint reports each sync run’s progress, and ?includeLag=true adds how far the table trails the upstream catalog. Both require executor=controller (set automatically by this flow). See Observability for full request and response details. When fileOnboardingRun.status is COMPLETED and segmentsUploaded matches filesDiscovered, run a query against the broker (or the Data Portal query console) to confirm the data is live:
The count will be much larger than the preview’s summary.nSourceRows (preview only samples up to ~100 rows) — confirm it’s non-zero and plausible for your dataset. If the run status is COMPLETED but the count is 0, give segments a moment to load on the servers, then recheck; if it persists, see Troubleshooting. Next: speed up queries. For common questions and failures, see the FAQ and Troubleshooting.

Step 1: Validate and browse the connection

POST /connections/browse There is no separate “validate” endpoint. Browsing the catalog is the validation step: a 200 with an items list (even an empty one) confirms your PAT, scope, and connectivity.
  • Set path to "" to browse the root — this both validates the connection and lists schemas (namespaces).
  • Set path to a schema name to list the tables inside it.

Request

Response

Step 2: Preview the schema

POST /tables/preview Samples the source, infers a Pinot schema, and returns an enriched table config (S3 tier, raw field configs, time column) plus sample rows. Review it, tweak if needed, then carry the schema and config forward to steps 3 and 4.
The request and response share the same JSON shape. You send a tableConfig describing the source; the response fills in schema, the enriched tableConfigs.offline, sampled rows, and a summary.

Request

Top-level fields: config.inference — how the schema is derived: Resolution order: explicit schema → embedded schema → inferred schema. config.sampling — how rows are sampled:
Setting the namespace and table. Take them from the browse response — set catalog.iceberg-rest.table.namespace (the Snowflake schema) and .tableName to the NAMESPACE and TABLE you selected.Use executor: controller — it’s required for the controller-watcher flow and the observability endpoints. The input tableConfig is intentionally minimal; /tables/preview returns the complete tableConfigs.offline you persist in Step 4.

Response

Adjust the schema (time column, column names, null handling) before moving on.

Step 3: Create the schema

POST /schemas Send the schema object from the preview response. Rename its schemaName to match your table.

Step 4: Create the table

POST /tables Send the enriched tableConfigs.offline object from the preview response. Its ExternalTableSyncTask block marks the table as external.
The controller discovers the table, runs the first sync, and re-syncs on a schedule. There is no separate start call. To run the first sync right away, use the trigger API.

Authentication

An External Table authenticates in two places, configured independently:
  • Catalog (REST) — the Snowflake PAT, supplied via catalog.iceberg-rest.credential plus the token URI and scope.
  • Storage (S3 data files) — keys under catalog.iceberg-rest.auth.storage.*. Choose one of the methods below.

Catalog (REST) authentication

Pass the PAT as the catalog credential. StarTree exchanges it at the Snowflake token endpoint for a short-lived token, which it caches and refreshes automatically.
The PAT is a secret — treat the table config as sensitive and rotate the token on the DAYS_TO_EXPIRY cadence. A static PAT is not auto-rotated; when it expires, syncs fail until you update the table config with a new one. Key-pair JWT auth (a signed JWT in place of the PAT) works the same way — put the JWT in catalog.iceberg-rest.credential.

Storage authentication: choose one

Static access keys

What most Snowflake external-volume setups use. Use the canonical accessKeyId / secretAccessKey spellings (an optional sessionToken is also accepted). Avoid the shorter accessKey/secretKey aliases: only part of the pipeline honors them (segment generation does, Iceberg manifest and data-file reads do not), so a short-alias config falls back to the cluster’s ambient credentials for catalog file reads and can fail in confusing ways.
No static secrets in the table config — every S3 read assumes roleArn via STS. Three things to know: auth.storage.region is required whenever a roleArn is set (the sync fails fast without it); any static auth.storage access keys are ignored once a roleArn is present; and the AssumeRole call itself authenticates with the cluster’s ambient AWS identity (node role / IRSA), so the target role’s trust policy must trust that identity (plus the externalId, if you set one).

Cluster node role

Omit every auth.storage.* credential key — only region is required. Credential resolution falls back to the AWS SDK default chain (the node’s instance profile / IRSA role), which must already have S3 access.
Horizon can vend short-lived storage credentials, but the generic rest adapter does not consume vended credentials — configure static keys, an assumed role, or the cluster’s node role for storage explicitly.

Selecting the database

Set both catalog.iceberg-rest.warehouse and catalog.iceberg-rest.prefix to the Snowflake database name. prefix is required for Horizon: the generic adapter doesn’t send the warehouse query parameter that Snowflake’s /v1/config gates on, so without an explicit prefix, browse falls back to the un-prefixed /v1/namespaces path and fails with 404 Unable to find matching target resource method.
The Snowflake schema is the Iceberg namespace — set catalog.iceberg-rest.table.namespace to the schema name and catalog.iceberg-rest.table.tableName to the table.

Limitations

For everything External Tables support, see the Support Matrix.