Setting Up Your Database

Setting up your database

Defog lets user query data in your structured databases in natural language. To get started, you need to set up your database and metadata.

Defog never gets access to the actual data in your database. It only extracts the metadata, including table names, column names and column descriptions, to generate accurate results.

Add database credentials

To add your database credentials, go to Manage Database in the top navbar. Click on Update Database Credentials and fill in the details.

Extract metadata

Once you have added your database credentials, click on the Extract Metadata tab to extract the metadata from your database.

Use the dropdown to select all the tables in your database that you want to make queryable and click on Extract Table Metadata.

extract metadata

Review and save metadata

Review the extracted metadata. If no column descriptions were extracted, you may wish to add column descriptions. You can view our cookbook on schema definitions (opens in a new tab) for tips on how to define column descriptions.

💡

We have seen a 90+% reduction in query errors when customers define their schemas well!

Click on Save Changes once you have reviewed and/or added column descriptions.