Databases
Learn how to register and manage your databases within Kosmoy Studio’s Data Catalog.
Working with Databases
The Databases section of the Data Catalog allows you to register databases, creating metadata representations that point to your actual database instances. This provides a structured view of your database contents and enables you to use them in other parts of Kosmoy Studio, such as Data Channels and Vector Pipelines.
Prerequisites:
Before registering a database, you must have a corresponding Connection configured. Refer to the Connections section for details.
Supported Database Types
Kosmoy Studio currently supports the following database types:
- SQL Databases:
- PostgreSQL
- Vector Databases:
- PGVector
- Weaviate
- Pinecone
Registering a Database
-
Navigate to Databases: From the Kosmoy Studio home page, click on the “Data Management” menu in the left-hand navigation bar, then select “Data Catalog” and then click on “Databases”.
-
Add a New Database: Click the ”+ ADD” button located in the upper right corner of the Databases section.
-
Select Database Type: Choose either “SQL” or “Vector”.
-
Select Connection: From the dropdown menu, select the appropriate pre-configured Connection for your database.
-
Configure Database-Specific Settings:
- For SQL Databases (e.g., PostgreSQL): Define the Access Control Rules:
- Read Access: Grant read access to the database.
- Write Access: Grant write access to the database.
- Both: Grant both read and write access.
- For Vector Databases: No additional configuration is needed at this step.
- For SQL Databases (e.g., PostgreSQL): Define the Access Control Rules:
-
Click “Next”: Proceed to the next step.
-
Name and Describe the Database: Give your database a unique name and an optional description.
-
Click “Review”: Review the database details.
-
Click “Create”: Register the database in the Data Catalog.
Database Cards
The Databases section displays each registered database as a card. Each card shows:
- Database Type Icon: An icon representing the type of database (e.g., SQL, Vector).
- Database Name: The name you assigned to the database.
- Description: The description you provided for the database.
- Edit Icon (Pencil): Click this icon to update the database’s configuration, name, or description (only if the database is not in use).
- Delete Icon (Trash Bin): Click this icon to remove the database (only if the database is not in use).
Database Usage Restrictions
You cannot edit or delete a database if it is currently referenced by other entities within Kosmoy Studio. This includes being used in:
- Collections (for Vector Databases)
- Data Channels
- Assistants
- Any other Kosmoy Studio component that references databases.
Before attempting to edit or delete a database, ensure it is not actively used in any of these areas.
Updating a Database
You can update the configuration of a registered database, including its connection parameters, name and description, provided it is not currently referenced by any other component.
- Navigate to Databases: Go to “Data Management” > “Data Catalog” > “Databases”.
- Locate the Database Card: Find the card for the database you want to update.
- Click the Edit (Pencil) Icon: This will open the update dialog.
- Modify Database parameters: Update the database’s parameters as needed.
- Click “Save”: Save the changes.
If you attempt to edit a database that is currently in use, a warning banner will be displayed at the top of the screen, preventing the modification.
Removing a Database
You can remove a registered database if it’s no longer needed. However, you cannot delete a database that is currently referenced by any other component.
- Navigate to Databases: Go to “Data Management” > “Data Catalog” > “Databases”.
- Locate the Database Card: Find the card for the database you want to remove.
- Click the Delete (Trash Bin) Icon: This will trigger a confirmation prompt.
If you attempt to delete a database that is currently in use, a modal will appear, preventing the deletion and explaining that the database is in use.
- Confirm Deletion: Confirm that you want to delete the database.
Warning: Deleting a database is a permanent action and cannot be undone. Ensure that the database is not being referenced by any other component before proceeding.
Using Databases
Registered databases can be used to create Data Channels. Vector databases can also be used to create Collections.