Apache Iceberg Catalog CreateTable

Apache Iceberg Catalog CreateTable

Certified

Create an Apache Iceberg table

Creates a new Apache Iceberg table in the catalog with column definitions or raw schema JSON, partition specs, and properties.

yaml
type: io.kestra.plugin.iceberg.catalog.CreateTable

Create an Iceberg table with column definitions and partitioning

yaml
id: create_iceberg_table
namespace: company.team

tasks:
  - id: create_table
    type: io.kestra.plugin.iceberg.catalog.CreateTable
    catalogConfig:
      type: rest
      uri: "https://iceberg-catalog.example.com:8181"
      credential: "{{ secret('ICEBERG_CREDENTIAL') }}"
    namespace: "analytics"
    tableName: "events"
    columns:
      - name: id
        type: long
        required: true
        doc: "Unique event identifier"
      - name: event_time
        type: timestamptz
        required: true
      - name: region
        type: string
      - name: payload
        type: string
    partitionFields:
      - "days(event_time)"
      - "identity(region)"
    tableProperties:
      write.format.default: parquet
    ifNotExists: true

Create an Iceberg table using raw schema JSON

yaml
id: create_iceberg_table_json
namespace: company.team

tasks:
  - id: create_table
    type: io.kestra.plugin.iceberg.catalog.CreateTable
    catalogConfig:
      type: rest
      uri: "https://iceberg-catalog.example.com:8181"
      credential: "{{ secret('ICEBERG_CREDENTIAL') }}"
    namespace: "analytics"
    tableName: "raw_events"
    schemaJson: |
      {
        "type": "struct",
        "fields": [
          {"id": 1, "name": "id", "required": true, "type": "long"},
          {"id": 2, "name": "payload", "required": false, "type": "string"}
        ]
      }
Installation

Our standard Docker images already include this plugin. If you use a -slim image or another setup, install it with the following command:

kestractl plugins get io.kestra.plugin:plugin-iceberg --compatible-for $KESTRA_VERSION

For kestractl, use your Kestra version with --compatible-for, or specify an exact plugin version.

For Kestra CLI, replace LATEST with a specific version or version range to pin the plugin version.

Properties

Iceberg catalog configuration properties

Key-value configuration map passed directly to the Iceberg catalog. The 'type' key is required and must be set to 'rest'. Use 'uri' to supply the REST catalog endpoint URL. Sensitive values such as 'credential', 'token', and 'secret' are redacted from logs.

Table namespace

The namespace or database of the Iceberg table (e.g. 'analytics' or multi-level 'analytics.raw').

Table name

The name of the Iceberg table.

Assets this task consumes as inputs or produces as outputs, for lineage tracking and the asset graph (Enterprise Edition). A flow declaring this property on a task is rejected in the open-source edition.

Definitions
assetFailureBehaviorstring
Possible Values
IGNOREFAILWARN

Asset failure behavior

Behavior applied to the task state when a declared asset fails to render, emit, or be persisted (e.g. a lock conflict): FAIL escalates it to FAILED, WARN (default) warns it if it would otherwise succeed, IGNORE leaves the state untouched.

enableAutobooleanstring

Whether to auto-register assets referenced dynamically at runtime that are not statically declared in inputs or outputs.

inputsarray

The assets consumed as inputs.

id*string
Min length1
typestring
outputs

The assets produced as outputs.

id*string
Min length1
Max length150
type*object
descriptionstring
displayNamestring
metadataobject
Default{}
namespacestring
Min length1
Max length150
id*string
Min length1
Max length150
type*object
descriptionstring
displayNamestring
metadataobject
Default{}
namespacestring
Min length1
Max length150
id*string
Min length1
Max length150
type*object
descriptionstring
displayNamestring
metadataobject
Default{}
namespacestring
Min length1
Max length150
id*string
Min length1
Max length150
type*object
descriptionstring
displayNamestring
metadataobject
Default{}
namespacestring
Min length1
Max length150
id*string
Min length1
Max length150
type*object
descriptionstring
displayNamestring
metadataobject
Default{}
namespacestring
Min length1
Max length150
id*string
Min length1
Max length150
type*string
Min length1

Custom asset type

descriptionstring
displayNamestring
metadataobject
Default{}
namespacestring
Min length1
Max length150

Columns

List of column definitions specifying name, type, and optional required/doc flags. Mutually exclusive with 'schemaJson'; exactly one must be supplied.

Definitions
name*string

Column name

Name of the column

type*string

Data type

Iceberg data type: boolean, int/integer, long, float, double, date, time, timestamp, timestamptz, string, uuid, binary, decimal(p,s), fixed(l).

docstring

Documentation

Optional column documentation or comment

requiredboolean
Defaultfalse

Required

Whether the field is required (non-null)

Defaulttrue

If not exists

If true, do not fail if the table already exists.

Table location

Optional custom storage location (URI) for table data and metadata.

SubTypestring

Partition fields

Optional list of column names or transforms for partitioning (e.g. 'region', 'days(event_time)', 'bucket(16, id)').

Schema JSON

Raw Iceberg schema in JSON format. Mutually exclusive with 'columns'; exactly one must be supplied.

Table properties

Optional table configuration properties (e.g. 'write.format.default: parquet').

Created

Whether the table was created (false if it already existed).

Table location

The storage location of the table.

Table identifier

The full table identifier (namespace.table).