How to delete documents in a mongodb collection using mongodb delete step in Pentaho

1.4k Views Asked by At

https://github.com/maasdi/pentaho-mongodb-delete-plugin/wiki/MongoDB-Delete

Has the documentation here but I am unable to write a query in json

Use JSON Query Choose this option if you want to use JSON query expression for your delete criteria, when you tick this option the Query will be displayed

Does any one know how to delete json documents all not truncate but delete using pentaho pdi kettle step which is mongodb delete?

db.inventory.remove({}) following is the command which deletes all documents without removing the index and this command doesnt work in the pentaho ?? May be there is a way to pass it .There are no exampes on the link provided on how to use the plugin apart from what field each is in on the delete plugin

1

There are 1 best solutions below

1
On

Use a datagrid and put into it a constant say name and value test then pass this to the next mongodb delete step .Ensure json query expression is empty and you will get a warning "saying docs will be deleted in the collection" .Just click ok and run the ktr. documents deleted