Deleting data from repositories

vme64
vme64 New Altair Community Member
edited November 5 in Community Q&A
Hello,

  I split my processing in several processes which communicate through dIatasets stored in repositories, to ease debugging and to avoiding the execution of the whole workflow when I change just the last steps. But I would like to remove some of the intermediate results in the end of the processing chain, as they can get rather big and I backup them all in my limited 2GB Dropbox... But I did not find a programmatic way to delete things from repositories, just with mouse/keyboard. Is there a way to do this, through an operator or through a groovy scripts?

  As a possible feature suggestion: perhaps some kind of "cached" datasets, which could be all cleaned on demand, would be nice.

Best regards,

  Vinicius
Tagged:

Answers

  • Aj
    Aj New Altair Community Member
    Hi,

    How about reading the old repository first, then pass it through "select attributes" to filter out the attributes you do not want and rewriting it to a new repository? After that, you can possibly delete the old repository and start using the new repository from now on.

    Thanks,
    Ajay
  • Marco_Boeck
    Marco_Boeck New Altair Community Member
    Hi,

    there is no operator to do that for you, but this groovy script could help you.

    import com.rapidminer.repository.Repository;
    import com.rapidminer.repository.RepositoryLocation;
    import com.rapidminer.repository.Entry;

    RepositoryLocation loc = new RepositoryLocation("//LocalRepository/path/to/delete/nameOfEntry");
    Entry entry = loc.locateEntry();
    entry.delete();
    I do not recommend doing this, but it's possible.


    Regards,
    Marco