🐛 MongoDb Source: Added filter to avoid MongoDb system collections (#6860)
* Added filter to avoid MongoDb system collections
This commit is contained in:
@@ -8,5 +8,5 @@ COPY build/distributions/${APPLICATION}*.tar ${APPLICATION}.tar
|
||||
|
||||
RUN tar xf ${APPLICATION}.tar --strip-components=1
|
||||
|
||||
LABEL io.airbyte.version=0.1.1
|
||||
LABEL io.airbyte.version=0.1.2
|
||||
LABEL io.airbyte.name=airbyte/source-mongodb-v2
|
||||
|
||||
@@ -90,7 +90,7 @@ public class MongoDbSource extends AbstractDbSource<BsonType, MongoDatabase> {
|
||||
throws Exception {
|
||||
List<CheckedConsumer<MongoDatabase, Exception>> checkList = new ArrayList<>();
|
||||
checkList.add(database -> {
|
||||
if (database.getCollectionNames() == null || database.getCollectionNames().first() == null) {
|
||||
if (database.getCollectionNames().isEmpty()) {
|
||||
throw new Exception("Unable to execute any operation on the source!");
|
||||
} else {
|
||||
LOGGER.info("The source passed the basic operation test!");
|
||||
|
||||
Reference in New Issue
Block a user