Skip to content

非公式 / UnofficialCloudflare, Inc. 非提携。アカウント情報は入力しないでください。Not affiliated with Cloudflare, Inc. Do not enter Cloudflare credentials here.Official docsこのサイトについてプライバシー

StarRocks

最終更新 Markdown で表示Agent セットアップ

以下は、StarRocks ↗ を R2 Data Catalog に接続し、データを照会・変更する例です(読み書き両対応)。

前提条件

使用例

稼働中の StarRocks インスタンスで、次のコマンドを実行します。

-- Create an Iceberg catalog named `r2` and set it as the current catalog

CREATE EXTERNAL CATALOG r2
PROPERTIES
(
    "type" = "iceberg",
    "iceberg.catalog.type" = "rest",
    "iceberg.catalog.uri" = "<r2_catalog_uri>",
    "iceberg.catalog.security" = "oauth2",
    "iceberg.catalog.oauth2.token" = "<r2_api_token>",
    "iceberg.catalog.warehouse" = "<r2_warehouse_name>"
);

SET CATALOG r2;

-- Create a database and display all databases in newly connected catalog

CREATE DATABASE testdb;

SHOW DATABASES FROM r2;

+--------------------+
| Database           |
+--------------------+
| information_schema |
| testdb             |
+--------------------+
2 rows in set (0.66 sec)

役に立ちましたか?