Category: Datasources
Resource links
Updated

Error "Cannot Delete Datasource" When Trying to Delete a Datasource

Issue

When trying to delete a datasource, users may get the error "Cannot delete datasource since it has x queries using it". This article explains the steps to ensure no queries are tied to the datasource and enable users to successfully delete it.

 

Resolution

cannot delete datasource error

To delete a datasource, follow the below steps:

  1. Delete all queries tied to that particular datasource. 
    Datasources are workspace-scoped, so you need to ensure that none of the apps from that particular workspace have queries tied to this datasource.

    delete query
     
    1. Once the queries are deleted, make sure to redeploy the apps by clicking the Deploy button on the upper-right corner.
      This step is very important because it ensures that the deployed versions of the apps do not use the datasource either.


       
  2. Go to Datasources, select the respective datasource, click the 3-dots menu on the upper right, and select Delete.

    delete datasource

    Upon confirmation, the datasource should be successfully deleted.

    datasource deleted successfully