Accelerating Data Governance

Data governance is essential for maintaining the quality, clarity, and consistency of your data assets. DinoAI enhances your data governance practices by automating key tasks such as test generation, documentation, and entity relationship visualization.

Estimated completion time: 10 minutes

Prerequisites

  • Basic understanding of dbt™ testing and documentation concepts

What you'll learn

In this guide, you'll learn how to use DinoAI for:


1. Generating dbt™ Tests

Ensuring the reliability of your dbt™ models is a critical part of data governance. DinoAI simplifies this process by automatically generating comprehensive tests tailored to the structure and content of your dbt™ models. These tests help you maintain data integrity and consistency across your projects.

How to use:

  1. Open DinoAI: Click the Dino AI icon (🪄) on the left side of the Editor.

  2. Access the Test Generation Feature: Select the "One Click" command "Generate a test", or type "/test" in the prompt.

If you use Elementary Data for dbt™ tests, try our elementary-specific command command, "Generate elementary tests for dbt model".

  1. Specify Your Model: Enter the name of the model you want to test. For example:

/Test @nba_player_info

  1. Review Generated Test: Carefully examine the AI-generated test.

  2. Implement Test: Copy the generated test code and paste it into the appropriate .yml file in your project (e.g., schema.yml)

  3. Refine as Needed: Edit and update the test as required for your specific use case.

Alternative method to access the '/Test' command:

  1. Right-click a .sql file in the project folder, files tab, or open file.

  2. In the DinoAI Copilot dropdown, select "Generate tests".


2. Autogenerating Data Documentation

Well-documented data assets are crucial for clarity and collaboration within any organization. DinoAI can automatically generate detailed documentation for your models and individual columns, saving time and ensuring consistency in your data documentation practices.

  • Open the Catalog Tab: Navigate to the Catalog tab within the Apps Panel in the Code IDE.

  • Click "Autogenerate": At the top left of the Catalog panel, select the "Autogenerate" option to generate descriptions for your models and columns.

  • Edit and Save: Review the generated descriptions, make any necessary edits to fit your project's specific context, and then save the changes.


3. Generating Entity Relationship Diagrams

Entity relationship diagrams (ERDs) are crucial for visualizing the structure and relationships within your data models. DinoAI can generate ERDs using Mermaid, allowing you to easily understand and communicate the relationships between different entities in your data.

How to use:

  1. Access the Mermaid Diagram Feature:

    • Right-click a .sql file from the project folder, the files tabs, or within an opened .sql file.

    • Hover over the DinoAI Copilot dropdown and select "Generate Mermaid Diagram".

  2. Review Generated Code: Carefully examine the AI-generated Mermaid code.

  3. Implement ER Diagram: Copy the generated code and paste it into a new .mmd file in your project.

  4. Visualize: Use a Mermaid viewer to see the visual representation of your model.

Alternative method to access the Mermaid Diagram feature:

  • Open DinoAI: Click the Dino AI icon (🪄) on the left side of the Editor.

  • Access the Mermaid Model Feature: Select the "One Click" command "Generate a mermaid diagram for a dbt model", or type "/mermaid" in the prompt.



Summary

You've learned how to use DinoAI to generate dbt™ tests, autogenerate data documentation, and create entity relationship diagrams. These features significantly enhance your data governance practices, ensuring your data assets remain reliable, well-documented, and easy to understand.

Next, we'll explore how DinoAI can accelerate your dbt™ development process.

Last updated