apache / apache/seatunnel

[Bug] [Module Name] Bug title oracle cdc 方式, 只建了表,没有收集已有数据,是我配置的不对吗

Open
#9,649 2 comments 0 reactions 0 assignees View on GitHub
bug
Dominant language
Java
Stars
9.7k
Forks
2.4k
Avg merge
3d 9h
Merged PRs (30d)
204

Description

### Search before asking

- [x] I had searched in the [issues](https://github.com/apache/seatunnel/issues?q=is%3Aissue+label%3A%22bug%22) and found no similar issues.

### What happened

source {
Oracle-CDC {
username = "xxx"
password = "xxxx"
database-names=["ORCL"]
schema-names=["xx"]
table-names = [
"ORCL.xxx.xq"
]
base-url = "jdbc:oracle:thin:@2.2.2.2:1521:ORCL"
source.reader.close.timeout=120000

plugin_output = "oracle_cdc_source"
}
}

### SeaTunnel Version

2.3.11

### SeaTunnel Config

```conf
env {
parallelism = 1
job.mode = "STREAMING"
checkpoint.interval = 5000
}

source {
Oracle-CDC {
username = "xxx"
password = "xxxx"
database-names=["ORCL"]
schema-names=["xx"]
table-names = [
"ORCL.xxx.xq"
]
base-url = "jdbc:oracle:thin:@2.2.2.2:1521:ORCL"
source.reader.close.timeout=120000

plugin_output = "oracle_cdc_source"
}
}

transform {
TableFilter{
plugin_input = "oracle_cdc_source"
plugin_output = "table_filter"
database_pattern = "xxxx"
table_pattern = "xhp_dwml"
pattern_mode = "EXCLUDE"
}

FilterRowKind {
plugin_input = "table_filter"
plugin_output = "filter_row_kind"
exclude_kinds = ["UPDATE_BEFORE"]
}

RowKindExtractor {
plugin_input = "filter_row_kind"
custom_field_name = "row_kind"
transform_type = FULL
plugin_output = "with_row_kind"
}

# 添加dt字段 - 使用当前日期
# 注意: dt必须是DATE类型, doris中自动分区字段必须是DATE类型
Sql {
plugin_input = "with_row_kind"
query = """
SELECT
*,
CURRENT_DATE as dt,
CURRENT_TIMESTAMP as ct
FROM with_row_kind
"""
plugin_output = "trans_result"
}
}

sink {
Doris {
plugin_input = "trans_result"
fenodes = "1.7.1.1:8030"
username = "root"
password = "111*o@111"
database = "mysql_${database_name}"
table = "ods_${table_name}"
save_mode_create_template = """
CREATE TABLE IF NOT EXISTS `${database}`.`${table_name}` (
${rowtype_primary_key},
dt DATE NOT NULL COMMENT 'dt',
ct DATETIME NOT NULL COMMENT 'ct',
${rowtype_fields}
) ENGINE=OLAP
DUPLICATE KEY (${rowtype_primary_key}, dt)
COMMENT '${comment}'
AUTO PARTITION BY RANGE (date_trunc(`dt`, 'year')) ()
DISTRIBUTED BY HASH (${rowtype_primary_key}) BUCKETS 5
PROPERTIES (
"replication_num" = "1",
"storage_format" = "V2",
"light_schema_change" = "true",
"disable_auto_compaction" = "false"
)
"""
sink.enable-2pc = "true"
sink.enable-delete = "false"
doris.config {
format = "json"
read_json_by_line = "true"
}
}
}
```

### Running Command

```shell
./bin/seatunnel.sh --config xxx.conf --async -n job1
```

### Error Exception

```log

```

### Zeta or Flink or Spark Version

_No response_

### Java or Scala Version

_No response_

### Screenshots

_No response_

### Are you willing to submit PR?

- [ ] Yes I am willing to submit a PR!

### Code of Conduct

- [x] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)

Contributor guide

No contributing guide indexed for this repository

Research direction

Start by reproducing the provided Oracle-CDC configuration on SeaTunnel 2.3.11 and inspect the source and sink behavior around startup. Confirm whether existing Oracle rows are captured in addition to table creation; the issue provides no failing test, source file, or error log to narrow the investigation.

Written by the indexing model from the issue text.

Assessment

Tech stack
java, sql
Domain
data-engineering, databases
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.