Delete all
To delete all records, you can use JSON query feature.
Let's create customer data from mongodb console:
use mongodbdelete
db.customer.insert({first_name:"OLVERA", last_name:"DWAYNE", phone: "62127829280", email:"olvera.dwayne@yahoo.com", gender: "F"})
db.customer.insert({first_name:"JASON", last_name:"DWAYNE", phone: "62127829280", email:"jason.dwayne@yahoo.com", gender: "M"})
db.customer.insert({first_name:"HUEY", last_name:"BRANDON", phone: "99883471275", email:"huey.brandon@yahoo.com", gender: "M"})
db.customer.insert({first_name:"BROWN", last_name:"ELIZABETH", phone: "10655648674", email:"elizabeth.brown@gmail.com", gender: "M"})
db.customer.insert({first_name:"OWENS", last_name:"CARMEN", phone: "272234298332", email:"owens.carmen@gmail.com", gender: "F"})
db.customer.insert({first_name:"HANNON", last_name:"SETH", phone: "864392582257", email:"hannon.seth@gmail.com", gender: "F"})
In mongodb to delete all records inside customer collection, the command:
use mongodbdelete
db.customer.remove()
To get the same result using Pentaho MongoDB Delete Plugin, follow steps bellow :
Step 1: Configure connection
Step 2: Set database and collection
Step 3: Configure query
To delete all records query use here is {}
or you can just leave query empty, the result will be the same.
Resources
Sample Transformation : delete-all.ktr