You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@paimon.apache.org by "bulolo (via GitHub)" <gi...@apache.org> on 2024/12/12 11:46:12 UTC
[I] [Feature] defined mongo cdc schema on mongodb_conf config [paimon]
bulolo opened a new issue, #4695:
URL: https://github.com/apache/paimon/issues/4695
### Search before asking
- [X] I searched in the [issues](https://github.com/apache/paimon/issues) and found nothing similar.
### Motivation
according to this issue https://github.com/apache/paimon/issues/4683
we find that mongo cdc change schema frequently,and can not query right value on starrock paimon cagalog
### Solution
like seatunnel we can defined a schema on mongo cdc table_conf
```
<FLINK_HOME>/bin/flink run \
/path/to/paimon-flink-action-0.9.0.jar \
mongodb_sync_table \
--warehouse hdfs:///path/to/warehouse \
--database test_db \
--table test_table \
--partition_keys pt \
--computed_column '_year=year(age)' \
--mongodb_conf hosts=127.0.0.1:27017 \
--mongodb_conf username=root \
--mongodb_conf password=123456 \
--mongodb_conf database=source_db \
--mongodb_conf collection=source_table1 \
--catalog_conf metastore=hive \
--catalog_conf uri=thrift://hive-metastore:9083 \
--table_conf bucket=4 \
--table_conf changelog-producer=input \
--table_conf sink.parallelism=4 \
--table_conf schema={
fields {
"_id" : int,
"name" : string,
"description" : string,
"weight" : string
}
}
```
### Anything else?
_No response_
### Are you willing to submit a PR?
- [ ] I'm willing to submit a PR!
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@paimon.apache.org.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org