Skip to content

Updated

Create an analytics bucket

Set up your first analytics bucket using the SDK or dashboard.

Create an analytics bucket to store large analytical datasets as Apache Iceberg tables.

Overview

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.

Procedure

You can create an analytics bucket using either the Supabase SDK or the Supabase Dashboard.

Using the Supabase SDK

To create the bucket in code, run the following in the language you use:

import { } from '@supabase/supabase-js'
const = ('https://your-project-id.supabase.co', 'your-service-key')
const { , } = await ...('analytics-data')
if () {
.('Failed to create analytics bucket:', )
} else {
.('Analytics bucket created:', )
}
from supabase import create_client
supabase = create_client('https://your-project-id.supabase.co', 'your-service-key')
response = supabase.storage.analytics().create('analytics-data')
print('Analytics bucket created:', response)

Using the Supabase Dashboard

To create the bucket in the Dashboard:

  1. Navigate to the Storage section in the Supabase Dashboard.
  2. Click Create Bucket.
  3. Enter a name for your bucket (e.g., my-analytics-bucket).
  4. Select Analytics Bucket as the bucket type.
  5. Click Create.
The Create storage bucket dialog with the name my-analytics-bucket entered and the Analytics bucket type selected.

Next steps

After you create your analytics bucket, you can:

To read more about Analytics Buckets, see these pages: