JDBC MONGO and objectId type

For people who are looking for convert objectId type from mongo to string in logstash

statement => "db.getCollection('YOUR_COLLECTION').aggregate([
    			 		{ $project: {
    							'_id': {$toString: '$_id'},
    							'FIELD_1':1,
    							'FIELD_2':1,
    							'FIELD_3':1 .......
    						}
    					}
    					]);"

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.