Apache SeaTunnel Documentation

repository·dev·Indexed 27 days ago

https://github.com/apache/seatunnel

A multimodal, high-performance, distributed data integration tool for synchronizing structured, unstructured, and binary data. It supports execution via the native SeaTunnel Zeta Engine, Spark, and Flink. The ecosystem includes the SeaTunnel CLI for generating configurations using natural language via LLM providers (AWS Bedrock, Anthropic, OpenAI) and a multi-agent pipeline for configuration validation and repair.

Tokens
308.1K
Snippets
584
Records
1.4K
Agent score
94%

What's inside Apache SeaTunnel

  1. Overview of SeaTunnel Engine

    dev

    SeaTunnel Engine is the default data synchronization engine for Apache SeaTunnel. It is designed for high-throughput, low-latency, and strong-consistent synchronous job operations. Key design characteristics include:

    • Performance: Uses an execution plan optimizer to reduce data network transmission and serialization/de-serialization overhead. Supports speed limits for controlled synchronization.
    • Stability: Uses Pipeline as the minimum granularity for checkpoints and fault tolerance. Task failures are isolated to their specific pipeline, preventing entire job failures. Supports data caching to prevent data loss from source expiration during target failures.
    • Resource Efficiency: Employs Dynamic Thread Sharing to run many small-data synchronization tasks in shared threads. Minimizes JDBC connections and reuses log reading/parsing resources in CDC scenarios.
    • Simplicity: Operates independently of big data components like Zookeeper or HDFS, providing its own cluster management, snapshot storage, and High Availability (HA).
  2. Overview of SeaTunnel AI CLI

    dev
    The SeaTunnel AI CLI is a tool that generates production-ready SeaTunnel pipeline configurations from natural language descriptions (English or Chinese). It produces validated HOCON configuration files and supports automatic validation, error repair, and one-click execution. It uses a multi-agent pipeline (Planner → Config Generator → Validator → auto-fix) to ensure configuration accuracy.
  3. Understand the SeaTunnel job model and engine choices

    dev

    A SeaTunnel job is defined as a pipeline consisting of three main components:

    1. Source: Connectors that define what data is read.
    2. Transform: Operations that modify or map the data.
    3. Sink: Connectors that define where the data is written.

    You can choose from different execution engines depending on your infrastructure:

    EngineBest starting pointWhen to use it
    SeaTunnel Engine (Zeta)Recommended for most new usersWhen you want the simplest path to run SeaTunnel jobs end to end
    Apache FlinkGood for existing Flink usersWhen you already operate Flink and want SeaTunnel to fit that platform
    Apache SparkGood for existing Spark usersWhen you already run Spark for batch workloads and want to reuse that stack
  4. Vertica Sink Connector Overview

    dev

    The Vertica Sink connector allows writing data to Vertica via JDBC.

    Key Capabilities:

    • Supports both Batch mode and Streaming mode.
    • Supports concurrent writing.
    • Supports timer flush.
    • Exactly-once semantics: While the connector supports exactly-once via XA transaction guarantees, Vertica is not listed as a JDBC XA data source in the shared JDBC appendix. Therefore, it is recommended to use the default setting is_exactly_once=false.
  5. Configure the CosFile sink connector

    dev
    The CosFile sink connector allows you to output data to the Tencent Cloud COS file system. It supports multimodal data integration (e.g., videos, pictures) and ensures exactly-once delivery using 2PC commit by default. Supported file formats include text, csv, parquet, orc, json, excel, xml, binary, canal_json, debezium_json, and maxwell_json.
  6. Manage State with Checkpoint Storage Abstraction

    dev

    SeaTunnel decouples state management from the underlying storage implementation through the CheckpointStorage abstraction. This allows you to choose the most suitable storage for your deployment, such as:

    • FileSystem (Local)
    • HDFS
    • S3
    • OSS

    The system supports pluggable serialization, incremental checkpoints to reduce overhead, and automatic state cleanup.

  7. Understand the Separation of Coordination and Execution

    dev

    SeaTunnel separates control logic from data processing to improve fault tolerance and scalability:

    • Coordination Layer (Master-side): Runs on master nodes. It is single-threaded and lightweight. Its responsibilities include resource discovery, work distribution (assigning splits), failure detection, and global state coordination.
    • Execution Layer (Worker-side): Runs on worker nodes. It is multi-threaded and resource-intensive. It handles local data processing, progress reporting, and participating in checkpoints.

    This separation allows the system to distinguish between 'control state' (which splits are assigned/pending) and 'execution progress' (the specific offset or position within a split), enabling precise recovery after failures.

  8. Understand Clickhouse Parallel Reading Modes

    dev

    The Clickhouse source connector supports parallel reading through two primary modes:

    1. Query Table Mode: Triggered by setting the table_path parameter. Parallelism is implemented based on the table's part files, retrieved from the system.parts table.
    2. SQL Mode: Triggered by setting the sql parameter. Parallelism is implemented via the execution of local table-based queries on each cluster shard.
      • If sql specifies a distributed table, it is automatically converted to query local tables.
      • If sql specifies a local table, the node configured in host is used as the shard.

    Note: If both table_path and sql are provided, the connector operates in SQL mode, using table_path primarily for metadata identification.

  9. Understand SeaTunnel's Engine Independence

    dev
    SeaTunnel is designed to decouple connector logic from the execution engine. This allows you to reuse the same connectors across different infrastructures like Flink or Spark. Connectors implement the unified SeaTunnel API (Source, Sink, and Transform), and a translation layer adapts these to the specific engine being used. This approach enables high reusability and easier development, as you only need to learn a single API to support multiple engines.
  10. Understand SeaTunnel Engine (Zeta) Architecture

    dev

    SeaTunnel Engine (Zeta) is a lightweight, high-performance native execution engine designed for data synchronization. It uses a Master-Worker architecture with slot-based resource management and supports checkpoint-based recovery for exactly-once semantics.

    Key Design Goals

    • Lightweight: Minimal dependencies and low resource overhead.
    • Fault Tolerance: Checkpoint-based recovery.
    • Resource Efficiency: Fine-grained control via slot-based management.
    • Engine Independence: Uses the same connector API as Flink/Spark translations.