CREATE EXTERNAL COLLECTION on a Catalog
- Operational Insights
- reference
Use CREATE EXTERNAL COLLECTION to register an Iceberg table from an external catalog in Operational Insights, enabling SQL++ queries against the data in object storage.
An external collection created on an Iceberg catalog maps to a specific table in that catalog.
The collection name is used in queries and does not need to match the Iceberg table name, which is supplied in the WITH clause.
The link in the AT clause is used to read data files in object storage, and may differ from the link used to authenticate the catalog.
For an overview of supported catalog types and authentication, see Iceberg Tables.
Syntax
CREATE EXTERNAL COLLECTION <collection-name>
ON <catalog-name>
AT <link-name>
WITH {
"table-format": "iceberg",
"tableName": "<iceberg-table-name>",
"namespace": "<iceberg-namespace>"
[, "decimal-to-double": "true" ]
[, "date-to-int": "true" ]
[, "time-to-int": "true" ]
[, "timestamp-to-long": "true" ]
[, "snapshotId": "<snapshot-id>" ]
[, "snapshotTimestamp": "<timestamp-ms>" ]
};
Arguments
- collection-name
-
The name of the collection in Operational Insights. Used in queries — does not need to match the Iceberg table name.
- ON catalog-name
-
The name of the catalog this collection is created on.
- AT link-name
-
The link used to read data files in object storage. This may differ from the link used when creating the catalog.
- WITH
-
A JSON object with the following properties.
| Property | Description | Required |
|---|---|---|
|
The table format type.
Must be |
Yes |
|
The actual Iceberg table name in the catalog. |
Yes |
|
The Iceberg namespace the table belongs to. |
Yes |
|
When |
No |
|
When |
No |
|
When |
No |
|
When |
No |
|
Snapshot ID to pin this collection to for time travel.
Cannot be used together with |
No |
|
Snapshot timestamp to pin this collection to.
Accepts milliseconds since Unix epoch, a date string in |
No |