For the complete documentation index, see llms.txt. This page is also available as Markdown.

Copy of Analyze your database with AI

Analyzing your data with AI is a core part of how Toucan AI helps you move from raw data to actionable insights, faster.

Objective

In this tutorial, we will show you how to analyze your connected database using AI to enrich the context of future prompts and generate more relevant charts and dashboards.


Prerequisites

You must have already connected a database (see the first tutorial on how to add a database).


Steps

1. Access Your Database

  • Once your database is connected, go to the Databases section and click on the database you want to analyze from the list.

2. Explore the Database Schema

  • Once you're inside the database, you will be able to see its schema and the various tables it contains.

  • On the left side of the screen, you will see a list of tables in the database, such as HR data, sales data, video game data, or climate data for instance.

3. View the Table Structure

  • On the right side of the screen, the structure of the database is displayed.

  • You will see column names, display names in the dashboard, data types, and an option to manually set data types using a dropdown. You can also add descriptions for each column.

4. Use AI to Analyze the Database

  • Toucan AI is intelligent enough to understand your data structure. To enrich the database context automatically, click on the Analyze button in the top-right corner.

  • Once clicked, a loading bar will appear, and after a few seconds, all tables will be analyzed. You will see the table descriptions and column descriptions being automatically completed.

Analyze Database

5. Review and Adjust the Descriptions

  • AI will detect field types and try to interpret them. For example, if a field was marked as a string, but it contains dates, Toucan AI will recognize it as a date type based on the data inside that column.

  • These descriptions can be manually adjusted to improve the context and provide better insights for future visualizations. It's crucial to refine these descriptions to ensure highly relevant charts and dashboards are generated.

6. Add More Context Manually

  • Although this is not yet a full semantic layer, it is coming soon in Toucan AI. You can continue to fine-tune the database context by adding detailed and precise descriptions for each table and column.

Database Metadata

7. Preview Your Data and Apply Security

  • Alongside the table structure, you will also see two additional buttons:

    • Preview: Clicking this will show a preview of your data.

    • RLS (Row Level Security): This feature will be discussed in later tutorials, as it allows you to apply data security at a granular level.


Conclusion

Congratulations! You have successfully analyzed your database with AI, which will help you create more relevant charts and dashboards in future steps.

Suggested Next Steps: discover how-to create a chart with AI!

Last updated

Was this helpful?