DbSchema Database Designer

How to Generate Snowflake Database Documentation with DbSchema



Introduction

This tutorial will show you how to quickly generate documentation for your Snowflake database using DbSchema. It will cover creating and exporting an interactive Data Dictionary in HTML5 or PDF, including tables, foreign keys, views, stored procedures, and more.

1. Get Ready

Before generating documentation, follow these steps:

  • Download DbSchema from here (available for Windows, macOS, and Linux).
  • Install DbSchema and launch the application.
  • Get a free trial key of 30 days to unlock HTML5 export, ER diagrams, and collaboration features.

2. Connect to Your Snowflake Database

To start documenting your Snowflake database, you need to connect DbSchema to Snowflake.

  1. Open DbSchema and Select Snowflake as Your Database Type
    Start by opening DbSchema and selecting Snowflake from the list of available database types.

  2. Enter Your Snowflake Connection Details
    Provide your Snowflake connection details, which include:

    • Account URL
    • Username (mandatory)
    • Password (mandatory)
      Optionally, you can specify the database, warehouse, schema, and role to customize your connection.

    For a complete guide on how to connect DbSchema to Snowflake, read this documentation.

  3. Click “Connect” & Select the Schema
    After entering the necessary details, click Connect to establish the connection. You will then be prompted to select the schema you wish to import.

  4. DbSchema Will Retrieve Your Schema
    Once connected, DbSchema will retrieve the structure of your database, including tables, columns, foreign keys, stored procedures, triggers, and more.

Connect to Snowflake

3. Documentation Overview

Once connected, you can explore your database schema in DbSchema’s interactive UI. The documentation will include:

  • Tables and Columns
  • Relationships (Foreign Keys)
  • Views and Stored Procedures
  • Indexes and Constraints
  • Custom Metadata (tags, comments, annotations, etc.)

You can edit descriptions and metadata directly in DbSchema to improve the documentation quality.

4. Export to Interactive HTML5

When documenting a Snowflake schema in DbSchema, exporting to HTML5 is the recommended option. The HTML5 format enables interactive navigation and easy searching, providing a user-friendly experience for your team and stakeholders.

Steps to Export HTML5 Documentation

  1. Click on “Export Documentation”
    Navigate to ‘Diagram’ -> ‘Export Documentation’ within DbSchema.

  2. Choose “HTML5” as the Format
    Select “HTML5” to generate interactive documentation viewable in any modern browser.

  3. Select the Content to Include
    Choose which elements of your schema to include in the documentation (e.g., Tables, Views, Foreign Keys, etc.).

  4. Choose the File Path
    Select the directory where you want the HTML documentation to be saved.

  5. Click “Generate”
    Once set, click “Generate” to create an interactive HTML5 file for sharing and viewing.

HTML5 Export Example

Automate Documentation with Java Groovy Scripts

For teams that need to automate the documentation generation process, you can use Java Groovy Scripts to generate HTML5 documentation. This ensures consistency and saves time.

Sample HTML Export

Here’s a sample of what the interactive HTML export looks like:

  • Interactive Navigation: Collapsible sections for easy schema navigation.
  • Search Functionality: Built-in search to quickly find specific tables or relationships.
  • Responsive Design: Optimized for both desktop and mobile viewing.

To explore a sample of our interactive database diagram, click the button below.

5. Export to PDF

If you prefer a static format or need a printable version of your documentation, exporting to PDF is an excellent choice. While PDF documentation lacks the interactivity of HTML5, it offers a clear and shareable format suitable for offline access and printing.

Steps to Export PDF Documentation

  1. Click on “Export Documentation”
    Start the export by navigating to “Export Documentation” in DbSchema.

  2. Choose “PDF” as the Format
    Select the “PDF” option from the export menu.

  3. Select the Content to Include
    Choose which elements to include in your PDF.

  4. Choose the File Path
    Select where you want to save the PDF.

  5. Click “Generate”
    Click “Generate” to create your PDF documentation.

Sample PDF Export

Although the PDF version is not interactive, it will contain a detailed, static overview of your schema. You can use the exported PDF for offline sharing, printing, or distributing to those who don’t need interactive features.

Download a Sample PDF

6. Keeping Documentation Up to Date

DbSchema makes it easy to keep your documentation up-to-date through automatic schema comparison and Git integration. These features help you:

  • Detect changes in the database schema
  • Highlight differences between versions
  • Update the documentation automatically
  • Use Git for versioning your documentation, ensuring that team members can track changes and collaborate effectively.

Git Integration for Snowflake

Conclusion

DbSchema provides a powerful, automated way to document your Snowflake database. With interactive HTML5 and PDF exports, you can easily share, navigate, and maintain your database documentation.

Try DbSchema today and start generating your Snowflake documentation!


Visual Design & Schema Diagram

➤ Create and manage your database schema visually through a user-friendly graphical interface.

➤ Easily arrange tables, columns, and foreign keys to simplify complex database structures, ensuring clarity and accessibility.

GIT & Collaboration
Version Control & Collaboration

➤ Manage schema changes through version control with built-in Git integration, ensuring every update is tracked and backed up.

➤ Collaborate efficiently with your team to maintain data integrity and streamline your workflow for accurate, consistent results.

Data Explorer & Query Builder
Relational Data & Query Builder

➤ Seamlessly navigate and visually explore your database, inspecting tables and their relationships.

➤ Build complex SQL queries using an intuitive drag-and-drop interface, providing instant results for quick, actionable insights.

Interactive Documentation & Reporting
HTML5 Documentation & Reporting

➤ Generate HTML5 documentation that provides an interactive view of your database schema.

➤ Include comments for columns, use tags for better organization, and create visually reports.