Skip to content

delete workspace data in scopedb

goal

usually when a POC ends we need to delete the data of the POC workspace. this runbook guide you through the process of that

steps

  1. Find the workspace_id (the format is wksp_xxxxxxxxxxxxxxxxxx) that you want to enable only scopedb. fill it in here

CAUTION

make sure you have the right workspace id is VERY IMPORTANT

  1. find the id of the workspace using mysql client, execute this to get id(the format is txxx) of workspace
sql
select * from main_workspace where uuid = '<workspace_id>';
  1. using scopeql client, run the following command to delete the data
scopeql
from system.tables where database_name = 'scopedb' and schema_name = 'txxx';
delete from scopedb.txxx.l;
delete from scopedb.txxx.r;
delete from scopedb.txxx.t;

if deleting sepcific source

scopeql
delete from scopedb.t46.`l` where source = "netflow";