apache / seatunnel

SeaTunnel is a next-generation super high-performance, distributed, massive data integration tool.
https://seatunnel.apache.org/
Apache License 2.0
8.01k stars 1.81k forks source link

[Bug] [Module Name] Bug title #5578

Open liutaobigdata opened 1 year ago

liutaobigdata commented 1 year ago

Search before asking

What happened

When using kafka virtual table, source_table_name and result_table_name in transform are both random numbers at the beginning of Table. What are the considerations for designing this way?

SeaTunnel Version

2.3.3

SeaTunnel Config

env {
"job.mode"=STREAMING
"job.name"=kafka-to-sr
}
source {
Kafka {
    "start_mode"=latest
    "consumer.group"=flink-seatunnel-test
    "commit_on_checkpoint"="true"
    format=JSON
    "debezium_record_include_schema"="true"
    "partition-discovery.interval-millis"=-1
    parallelism=1
    "result_table_name"="Table10989895186498"
    topic="topic_1"
    schema {
        fields {
            age=int
            name=string
        }
    }
    "bootstrap.servers"=""
    "kafka.config" {
        "sasl.jaas.config"=""
        "sasl.mechanism"=PLAIN
        "security.protocol"="SASL_PLAINTEXT"
    }
}
}
transform {
Sql {
    query="select * from topic_1 where age>30"
    "result_table_name"=Table10989895186497
    "source_table_name"="Table10989895186498"
}

}
sink {
StarRocks {
    "batch_max_rows"=1024
    "batch_max_bytes"=5242880
    "enable_upsert_delete"="true"
    savemode="KEEP_SCHEMA_AND_DATA"
    "save_mode_create_template"="CREATE TABLE IF NOT EXISTS `${database}`.`${table_name}` (\n${rowtype_fields}\n) ENGINE=OLAP\n PRIMARY KEY (${rowtype_primary_key})\nDISTRIBUTED BY HASH (${rowtype_primary_key})PROPERTIES (\n    \"replication_num\" = \"1\" \n)"
    "source_table_name"=seatunnel
    table=seatunnel
    database="flink_application"
    nodeUrls=[
        ""
    ]
    password="123456"
    username=root
    base-url=""
}
}

Running Command

Launch script via seatunnel-web

Error Exception

The kafka table  topic_1 is not found

Zeta or Flink or Spark Version

No response

Java or Scala Version

java 8

Screenshots

No response

Are you willing to submit PR?

Code of Conduct

liugddx commented 1 year ago

Please maintain the issue title well.

liugddx commented 1 year ago

Refer to https://seatunnel.apache.org/docs/transform-v2/common-options/#result_table_name-string