1
0
mirror of synced 2025-12-25 11:06:55 -05:00

🐛 MongoDb Source: Added filter to avoid MongoDb system collections (#6860)

* Added filter to avoid MongoDb system collections
This commit is contained in:
irynakruk
2021-10-11 13:41:24 -04:00
committed by GitHub
parent ef7a311e7c
commit 22c3a9e043
6 changed files with 15 additions and 7 deletions

View File

@@ -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

View File

@@ -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!");