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

Analyze your database with AI

Target Audience: Non technical users

Goal

Enrich a database schema with semantic metadata to improve the quality of AI-powered queries and visualizations.


Prerequisites


Steps

1. Access the Database Schema

  • Navigate to the Databases section.

  • Select the specific database for analysis.

  • View the list of identified tables and their current structure.

2. Execute AI Analysis

  • Click the Analyze button in the top-right corner of the database view

  • Select Schemas & Tables: In the "Select schemas to analyze" modal, use the checkboxes to choose the specific schemas and tables you wish to enrich.

    • Click the Analyze button within the modal to launch the enrichment process.

  • Monitor Progress: Monitor the loading bar as Toucan.ai samples the selected data.

  • Verification: Wait for the "Enriched" status to appear on the tables before proceeding.

Analyze Database

3. Review and Refine

  • Select a table to view its Structure tab.

  • Verify that the Semantic Field Type is accurate.

  • Modify Display Names or Descriptions to provide better context for natural language prompts.

4. Validate Data and Security

  • Use the Preview tab to inspect a limited sample of the data records.

  • Access the Access Rules (Row-Level Security) tab to map user attributes to specific table columns:

    • Define Logical Rules: Beyond simple mapping, you can now use operators to create complex access logic (e.g., Department contains Sales).

    • Multi-Condition Logic: Use the + AND or + OR buttons to group conditions for a single table.

    • Attribute Mapping: RLS operations compare Dataset Fields against User Attributes (provided via your authentication token).


Constraints

  • Ambiguity: Field type inference may be incorrect for columns with generic naming or data.

  • Schema Evolution: You must re-run the analysis if the underlying database structure changes.

  • Preview Limits: The Preview tab is for validation only and is not intended for reporting.


Conclusion

The database now contains the semantic context necessary for the AI assistant to interpret user prompts. You may now proceed to create charts in the Library or finalize security rules in the Govern phase.

Suggested Next Step: How-to: Create a dashboard with AI

Last updated

Was this helpful?