I ran into an issue while trying to clean up and recreate a table. After restarting my server, I wanted to drop a DFS table named stock and start fresh. Following the documentation, I used dropTable, but it failed with an error.
Here’s what I did:
db = database("dfs://stock")
dropTable(db, "stock")
The server response Error: RemoteRun[controller8700] getFileBlocksMeta on path '/stock/stock.tbl' failed, reason: path does not exist.
What went wrong here? How can I forcefully delete the entire database stock along with all its tables?
Thank you for using DolphinDB.
To resolve this issue, you can forcibly remove the recovering partitions of the table using dropRecoveringPartitions
from the ops
module.
use ops
dropRecoveringPartitions(dbPath="dfs://stock", tableName="stock")
Once that's done, you can safely delete the table using dropTable
.
If you run into any other issues, don't hesitate to ask - we're happy to help!