<@U04SE163WC8> In which table of your database can...
# ask-ai
y
@kapa.ai In which table of your database can I find the custom source? i want to delete one
u
To delete a custom source, you would need to interact with the
actor_definition
table in the
airbyte-db
database. This table contains the definitions for your custom sources and destinations. However, before deleting a custom source, make sure to delete all the sources/destinations related to that connector. Here is an example of a SQL query that you can use to delete a custom connector:
Copy code
sql WITH c_b_p AS (   DELETE FROM connector_builder_project   WHERE name = '<your connector name here>'   RETURNING id, actor_definition_id ), a_d_m AS (   DELETE FROM active_declarative_manifest t   USING c_b_p   WHERE t.actor_definition_id = c_b_p.actor_definition_id ), a_d AS (   DELETE FROM actor_definition t   USING c_b_p   WHERE t.id = c_b_p.actor_definition_id ) SELECT * FROM c_b_p;
Please replace
<your connector name here>
with the name of your custom connector. This query was tested with the Airbyte schema as of version 0.50.54. Please note that directly modifying the database can have unintended side effects and should be done with caution. Sources: - [Forum Post: How to change source name in UI?](https://discuss.airbyte.io/t/1825) - [Github Issue (closed): Add instructions to delete custom connectors](https://github.com/airbytehq/airbyte/issues/22606)
y
@kapa.ai How is the query to show all custom sources?
u
A message from kapa.ai
u
To list all custom sources, you can query the
actor_definition
table in the
airbyte-db
database. This table contains the definitions for your custom sources and destinations. Here is an example of a SQL query that you can use to list all custom connectors:
Copy code
sql SELECT * FROM actor_definition WHERE actor_type = 'source';
This query will return all sources, including both custom and pre-built ones. If you only want to see custom sources, you would need to filter the results based on your specific naming or configuration patterns for custom sources. Please note that directly querying the database should be done with caution and understanding of the underlying schema. Sources: - [Forum Post: How to change source name in UI?](https://discuss.airbyte.io/t/1825) - [Github Issue (closed): Add instructions to delete custom connectors](https://github.com/airbytehq/airbyte/issues/22606)
y
@kapa.ai ERROR: relation "actor_definition" does not exist LINE 1: SELECT * FROM actor_definition;
u
A message from kapa.ai
u
I'm sorry for the confusion. The
actor_definition
table was mentioned based on the assumption of its existence in the Airbyte database schema. However, it seems like this table does not exist in your current Airbyte database. Airbyte does not provide direct database access for managing sources. The recommended way to manage sources, including custom sources, is through the Airbyte API or the Airbyte UI. If you want to list all sources, you can use the
listSources
method of the Airbyte API. Here is an example of how to use this method:
Copy code
http GET /sources
This will return a list of all sources. You can also add query parameters to this request to filter the results. For example, you can add a
workspaceIds
parameter to list sources for specific workspaces. If you want to delete a source, you can use the
deleteSource
method of the Airbyte API. Here is an example of how to use this method:
Copy code
http DELETE /sources/{sourceId}
Replace
{sourceId}
with the ID of the source that you want to delete. Please refer to the [Airbyte API documentation](https://reference.airbyte.com/reference/start) for more details on how to use these methods. If you are still having trouble, please consider reaching out to the Airbyte community on [GitHub](https://github.com/airbytehq/airbyte) or the [Airbyte discussion forum](https://discuss.airbyte.io/). They may be able to provide more specific guidance based on your particular setup and needs.