创建分析分组
Set up your first analytics bucket using the SDK or dashboard.
分析存储桶使用 Apache Iceberg,这是一种用于高效管理大型分析数据集的开放表格式。你可以使用像 PyIceberg、Apache Spark 或任何支持 Iceberg REST Catalog API 的客户端来与分析存储桶交互。
🌐 Analytics buckets use Apache Iceberg, an open-table format for efficient management of large analytical datasets. You can interact with analytics buckets using tools such as PyIceberg, Apache Spark, or any client supporting the Iceberg REST Catalog API.
关于复制
分析桶仍然可用,但通过 Supabase Pipelines 复制到分析桶已不再支持。如果你想使用分析桶,需要自己准备数据摄取管道。
🌐 Analytics Buckets are still available, but replication into Analytics Buckets via Supabase Pipelines is no longer supported. If you want to use Analytics Buckets, bring your own ingestion pipeline.
创建一个分析桶 #
🌐 Creating an Analytics bucket
你可以使用 Supabase SDK 或 Supabase 仪表板创建一个分析存储桶。
🌐 You can create an analytics bucket using either the Supabase SDK or the Supabase Dashboard.
使用 Supabase SDK #
🌐 Using the Supabase SDK
1import { createClient } from '@supabase/supabase-js'23const supabase = createClient('https://your-project-id.supabase.co', 'your-service-key')45const { data, error } = await supabase.storage.analytics.createBucket('analytics-data')67if (error) {8 console.error('Failed to create analytics bucket:', error)9} else {10 console.log('Analytics bucket created:', data)11}使用 Supabase 控制台 #
🌐 Using the Supabase Dashboard
- 在 Supabase 仪表板中导航到 存储 部分。
- 点击 创建存储桶。
- 为你的桶输入一个名字(例如,
my-analytics-bucket)。 - 选择 Analytics Bucket 作为桶类型。
- 点击创建。

下一步 #
🌐 Next steps
一旦你创建了分析存储桶,你可以:
🌐 Once you've created your analytics bucket, you can:
- 与 Iceberg 客户端 连接,比如 PyIceberg 或 Apache Spark
- 使用 Iceberg 外部数据封装器查询 Postgres 数据