MCPcopy Index your code
hub / github.com/apache/iceberg-go

github.com/apache/iceberg-go @v0.6.0

Chat with this repo
repository ↗ · DeepWiki ↗ · release v0.6.0 ↗ · + Follow
5,871 symbols 27,625 edges 259 files 1,174 documented · 20% 3 cross-repo links
What it actually does AI analysis from the code graph — generated when you open this
loading…
README

Iceberg Golang

Go Reference

iceberg is a Golang implementation of the Iceberg table spec.

Build From Source

Prerequisites

  • Go 1.25 or later

Build

$ git clone https://github.com/apache/iceberg-go.git
$ cd iceberg-go/cmd/iceberg && go build .

Running Tests

Use the Makefile so commands stay in sync with CI (e.g. golangci-lint version).

Unit tests

make test

Linting

make lint

Install the linter first

make lint-install
# or: go install github.com/golangci/golangci-lint/cmd/golangci-lint@v2.8.0

Integration tests

Prerequisites: Docker, Docker Compose

  1. Start the Docker containers using docker compose:

shell make integration-setup

  1. Export the required environment variables:

shell export AWS_S3_ENDPOINT=http://$(docker inspect -f '{{range.NetworkSettings.Networks}}{{.IPAddress}}{{end}}' minio):9000 export AWS_REGION=us-east-1 export SPARK_CONTAINER_ID=$(docker ps -qf 'name=spark-iceberg') export DOCKER_API_VER=$(docker version -f '{{.Server.APIVersion}}')

  1. Run the integration tests:

shell make integration-test

Or run a single suite: make integration-scanner, make integration-io, make integration-rest, make integration-spark.

Feature Support / Roadmap

FileSystem Support

Filesystem Type Supported
S3 X
Google Cloud Storage X
Azure Blob Storage X
Local Filesystem X

Metadata

Operation Supported
Get Schema X
Get Snapshots X
Get Sort Orders X
Get Partition Specs X
Get Manifests X
Create New Manifests X
Plan Scan x
Plan Scan for Snapshot x

Catalog Support

Operation REST Hive Glue SQL Hadoop
Load Table X X X X X
List Tables X X X X X
Create Table X X X X X
Register Table X X X
Update Current Snapshot X X X X X
Create New Snapshot X X X X X
Rename Table X X X X
Drop Table X X X X X
Alter Table X X X X X
Check Table Exists X X X X X
Set Table Properties X X X X X
List Namespaces X X X X X
Create Namespace X X X X X
Check Namespace Exists X X X X X
Drop Namespace X X X X X
Update Namespace Properties X X X X
Create View X X X
Load View X X
List View X X X
Drop View X X X
Check View Exists X X X

Read/Write Data Support

  • Data can currently be read as an Arrow Table or as a stream of Arrow record batches.

Supported Write Operations

As long as the FileSystem is supported and the Catalog supports altering the table, the following tracks the current write support:

Operation Supported
Append Stream X
Append Data Files X
Rewrite Files
Rewrite manifests
Overwrite Files X
Copy-On-Write Delete X
Write Pos Delete X
Write Eq Delete
Row Delta

CLI Usage

Run go build ./cmd/iceberg from the root of this repository to build the CLI executable, alternately you can run go install github.com/apache/iceberg-go/cmd/iceberg@latest to install it to the bin directory of your GOPATH.

The iceberg CLI usage is very similar to pyiceberg CLI \ You can pass the catalog URI with --uri argument.

Example: You can start the Iceberg REST API docker image which runs on default in port 8181

docker pull apache/iceberg-rest-fixture:latest
docker run -p 8181:8181 apache/iceberg-rest-fixture:latest

and run the iceberg CLI pointing to the REST API server.

 ./iceberg --uri http://0.0.0.0:8181 list
┌─────┐
| IDs |
| --- |
└─────┘

Create Namespace

./iceberg --uri http://0.0.0.0:8181 create namespace taxitrips

List Namespace

 ./iceberg --uri http://0.0.0.0:8181 list
┌───────────┐
| IDs       |
| --------- |
| taxitrips |
└───────────┘


Get in Touch

Extension points exported contracts — how you extend this code

BooleanExprVisitor (Interface)
BooleanExprVisitor is an interface for recursively visiting the nodes of a boolean expression [9 implementers]
visitors.go
BooleanExpression (Interface)
BooleanExpression represents a full expression which will evaluate to a boolean value such as GreaterThan or StartsWith, [10 …
exprs.go
SchemaVisitor (Interface)
SchemaVisitor is an interface that can be implemented to allow for easy traversal and processing of a schema. A SchemaV [19 …
schema.go
Type (Interface)
Type is an interface representing any of the available iceberg types, such as primitives (int32/int64/etc.) or nested ty [23 …
types.go
Transform (Interface)
Transform is an interface for the various Transformation types in partition specs. Currently, they do not yet provide ac [8 …
transforms.go
IO (Interface)
IO is an interface to a hierarchical file system. The IO interface is the minimum implementation required for a file sy [12 …
io/io.go
ArrowSchemaVisitor (Interface)
ArrowSchemaVisitor is an interface that can be implemented and used to call VisitArrowSchema for iterating [22 implementers]
table/arrow_utils.go
Catalog (Interface)
Catalog for iceberg table operations like create, drop, load, list and others. [8 implementers]
catalog/catalog.go

Core symbols most depended-on inside this repo

Error
called by 586
cmd/iceberg/output.go
Contains
called by 467
utils.go
Len
called by 441
utils.go
NewTransaction
called by 314
table/table.go
String
called by 269
exprs.go
Value
called by 203
literals.go
Metadata
called by 162
table/internal/interfaces.go
ToIdentifier
called by 160
catalog/catalog.go

Shape

Method 3,157
Function 2,020
Struct 487
Interface 102
TypeAlias 63
FuncType 42

Languages

Go100%
Python1%

Modules by API surface

manifest.go234 symbols
schema.go220 symbols
literals.go208 symbols
table/metadata.go171 symbols
types.go154 symbols
exprs.go151 symbols
table/arrow_utils.go135 symbols
catalog/hadoop/hadoop_test.go127 symbols
table/evaluators.go117 symbols
table/table_test.go110 symbols
table/evaluators_test.go110 symbols
transforms.go108 symbols

For agents

$ claude mcp add iceberg-go \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact