Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug][Connector-v2] MongoDB CDC Set SeatunnelRow's tableId #7935

Merged
merged 5 commits into from
Nov 6, 2024

Conversation

hawk9821
Copy link
Contributor

Purpose of this pull request

Does this PR introduce any user-facing change?

method of MongoDBConnectorDeserializationSchema.extractTableId not implemented , The tableId of SeatunnelRow is null, which may affect other downstream operations.
2716d3d925a1bb6e23d85a2e79dc149

How was this patch tested?

Check list

hailin0
hailin0 previously approved these changes Nov 1, 2024
@Hisoka-X Hisoka-X added the don't merge There needs to be a specific reason in the PR, and it cannot be merged for the time being. label Nov 1, 2024
@@ -310,3 +241,6 @@ sink {
}
```

## Feature
- Support Multi-table Synchronization for MongoDB-CDC.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

where?

"inventory.products",
keyDocument,
valueDocument);
Object tableId = ReflectionUtils.invoke(schema, "extractTableId", sourceRecord);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we can use @VisibleForTesting annotation to avoid use ReflectionUtils.

Comment on lines +94 to +95
List<String> collections = context.getOptions().get(MongodbSourceOptions.COLLECTION);
if (collections.size() != configCatalog.size()) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

how about add a test case for mongocdc with multi tables.

Copy link
Member

@Hisoka-X Hisoka-X left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Waiting CI passes

@hailin0 hailin0 merged commit f3970d6 into apache:dev Nov 6, 2024
5 checks passed
@hawk9821 hawk9821 deleted the mongodb_cdc branch November 6, 2024 06:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved cdc connectors-v2 document don't merge There needs to be a specific reason in the PR, and it cannot be merged for the time being. reviewed
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants