Remove a File

In MindsDB, files are treated as tables. These are stored in the default files database. To delete a file, you must save this files database into a variable and then, run the tables.drop() function on it.

Example

package org.example;

import mindsdb.MindsDB;
import mindsdb.models.Database;
import mindsdb.services.Server;

public class Main {

    public static void main(String[] args) {
        Server server = MindsDB.connect();
        Database filesDB = server.getDatabase("files");
        filesDB.dropTable("users");
    }
}
Updated on