Last update: 2025-09-24T12:06:11.000Z
Content:
---
title: "Apache Iceberg table function · Tinybird Docs"
theme-color: "#171612"
description: "Documentation for the Tinybird Iceberg table function."
inkeep:version: "forward"
---




# Iceberg table function BETA

[¶](https://www.tinybird.co/docs/forward/get-data-in/table-functions/iceberg#iceberg-table-function)

Copy as MD The Tinybird `iceberg()` table function is currently in private beta. If you're interested in early access, reach out to support.

The Tinybird `iceberg()` table function allows you to read data from your existing Apache Iceberg database in S3 into Tinybird, then schedule a regular copy pipe to orchestrate synchronization. You can load full tables, and every run performs a full replace on the data source.

To use it, define a node using standard SQL and the `iceberg` function keyword, then publish the node as a copy pipe that does a sync on every run. See [Table functions](../table-functions) for general information and tips.

Additionally you can use the `iceberg` table function in API endpoints.

## Setting secrets [¶](https://www.tinybird.co/docs/forward/get-data-in/table-functions/iceberg#setting-secrets)

Table functions require authentication credentials (such as AWS keys) that must be stored securely. Tinybird provides different methods for managing secrets depending on the version you're using.

### Using the Variables API (Classic) [¶](https://www.tinybird.co/docs/forward/get-data-in/table-functions/iceberg#using-the-variables-api-classic)

In Tinybird Classic, you must set your credentials using the Environment Variables API:

curl -X POST -H "Authorization: Bearer $TOKEN" \
  --data-urlencode "name=aws_key" \
  --data-urlencode "value=your_aws_key" \
  https://<TB_HOST_URL>/v0/variables/ For more details, see the [Environment Variables API](/docs/api-reference/environment-variables-api) documentation.

### Using the CLI (Forward) [¶](https://www.tinybird.co/docs/forward/get-data-in/table-functions/iceberg#using-the-cli-forward)

In Tinybird Forward, you manage secrets using the `tb secret` command:

tb secret set aws_key your_aws_key
tb secret set aws_secret your_aws_secret For more details, see the [tb secret](/docs/forward/dev-reference/commands/tb-secret) command documentation.

Once you've set up your secrets, you can reference them in your SQL with the `tb_secret` function as shown in the Syntax section below.

## Syntax [¶](https://www.tinybird.co/docs/forward/get-data-in/table-functions/iceberg#syntax)

Create a new pipe node. Call the `iceberg` table function and pass the AWS access key and secret as Tinybird secrets:

##### Example query logic

SELECT *
FROM iceberg(
  's3://your_bucket/iceberg/db/table',
  {{tb_secret('aws_key')}},
  {{tb_secret('aws_secret')}}
) Publish this node as a copy pipe. You can choose to append only new data or replace all data.

Check a full working example in this [GitHub repository](https://github.com/tinybirdco/iceberg-tinybird)

## See also [¶](https://www.tinybird.co/docs/forward/get-data-in/table-functions/iceberg#see-also)

- [  How to effectively use table functions](../table-functions)


