Commit 51cd95a
committed
[Fix](mongodb-cdc) Fix MongoDB connection options propagation and filter system collections
This commit fixes two issues:
1. connection-options not being passed to MongoDBSourceBuilder:
The internal Flink CDC key is \"connection.options\" (with dot), but users
naturally pass \"connection-options\" (with hyphen). Added getConnectionOptions()
to try both keys for compatibility. Also added .scheme() and .connectionOptions()
calls to MongoDBSourceBuilder which were previously missing.
2. Unauthorized errors on system collections:
MongoDB system collections (e.g. system.profile) cannot be accessed without
elevated privileges. Added a filter to skip collections starting with \"system.\"
during schema inference.1 parent dd4b7ef commit 51cd95a
1 file changed
Lines changed: 14 additions & 1 deletion
File tree
- flink-doris-connector/flink-doris-connector-flink1/src/main/java/org/apache/doris/flink/tools/cdc/mongodb
Lines changed: 14 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
109 | 109 | | |
110 | 110 | | |
111 | 111 | | |
112 | | - | |
| 112 | + | |
113 | 113 | | |
114 | 114 | | |
115 | 115 | | |
| |||
119 | 119 | | |
120 | 120 | | |
121 | 121 | | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
122 | 125 | | |
123 | 126 | | |
124 | 127 | | |
| |||
181 | 184 | | |
182 | 185 | | |
183 | 186 | | |
| 187 | + | |
| 188 | + | |
| 189 | + | |
| 190 | + | |
| 191 | + | |
| 192 | + | |
| 193 | + | |
| 194 | + | |
184 | 195 | | |
185 | 196 | | |
186 | 197 | | |
| |||
203 | 214 | | |
204 | 215 | | |
205 | 216 | | |
| 217 | + | |
| 218 | + | |
206 | 219 | | |
207 | 220 | | |
208 | 221 | | |
| |||
0 commit comments