Delete rows in a collection

Question: Is it possible to delete all the rows from a collection without deleting the collection itself?

Unfortunately not, we might consider adding this. But it’s generally not best practice. Best practice would be to have a suffix on your collection name (e.g. ‘_v1’) and then create an alias without the suffix. Your SQL code then uses the alias. Then you would create another collection with a suffix _v2, wait for it to load, swap the alias and then delete the original. I tend to create all of my collections via the CLI and I keep yaml files handy to recreate them easily. That way I am not making mistakes and don’t have to set up complex things like field mappings over and over again. @rockset/cli - npm. Once you have the CLI installed, and have set up an api key with 'rockset auth:add ’ you can get a decent start to your yaml file by getting the status of the existing collection - rockset api:collections:getCollection <workspace> <collectionName> --output yaml
There is a bunch of stuff you can and should strip out of that yaml to net it down to the elements needed to create the collection. Sources, field mappings and retention settings are the key ones. You can net down sources to just the source you are using.

Hope this helps. Let us know if you have any other questions.