Skip to content

Conversation

@saravanapandic
Copy link

@saravanapandic saravanapandic commented Nov 23, 2025

Description
This package adds AI support to dbt using Snowflake Cortex.
It helps developers read, check, and improve dbt models quickly.

Right now, the package has one stable feature:

Ai_Debug – shows the raw Jinja + SQL code of any dbt model.

The package also includes beta features like AI-based SQL validation, and more features will be added soon.

Required Cortex setup:
Your Snowflake admin must enable Cortex by running:
ALTER ACCOUNT SET CORTEX_ENABLED_CROSS_REGION = 'ANY_REGION';

Link to your package's repository:

https://github.com/saravanapandic/AI_Cortex_Snowflake

Checklist

This checklist is a cut down version of the best practices that we have identified as the package hub has grown. Although meeting these checklist items is not a prerequisite to being added to the Hub, we have found that packages which don't conform provide a worse user experience.

First run experience

  • (Required): The package includes a licence file detectable by GitHub, such as the Apache 2.0 or MIT licence.
  • The package includes a README which explains how to get started with the package and customise its behaviour
  • The README indicates which data warehouses/platforms are expected to work with this package

Customisability

  • The package uses ref or source, instead of hard-coding table references.

Packages for data transformation (delete if not relevant):

  • provide a mechanism (such as variables) to customise the location of source tables.
  • do not assume database/schema names in sources.

Dependencies

Dependencies on dbt Core

  • The package has set a supported require-dbt-version range in dbt_project.yml. Example: A package which depends on functionality added in dbt Core 1.2 should set its require-dbt-version property to [">=1.2.0", "<2.0.0"].

Dependencies on other packages defined in packages.yml:

  • Dependencies are imported from the dbt Package Hub when available, as opposed to a git installation.
  • Dependencies contain the widest possible range of supported versions, to minimise issues in dependency resolution.
  • In particular, dependencies are not pinned to a patch version unless there is a known incompatibility.

Interoperability

  • The package does not override dbt Core behaviour in such a way as to impact other dbt resources (models, tests, etc) not provided by the package.
  • The package uses the cross-database macros built into dbt Core where available, such as {{ dbt.except() }} and {{ dbt.type_string() }}.
  • The package disambiguates its resource names to avoid clashes with nodes that are likely to already exist in a project. For example, packages should not provide a model simply called users.

Versioning

  • (Required): The package's git tags validates against the regex defined in hubcap/version.py (examples).
  • The package's version follows the guidance of Semantic Versioning 2.0.0. (Note in particular the recommendation for production-ready packages to be version 1.0.0 or above)

This package adds AI features to dbt using Snowflake Cortex. It helps you check, debug, and improve your dbt models more easily.

Right now, it includes one stable feature:

Ai_Debug – shows the raw code of any dbt model.
This is helpful for reviewing models, debugging issues, and sending model code to AI tools.

The package also includes early beta features (like Ai_Validate_Model) that use Snowflake Cortex AI to check your SQL, fix simple mistakes, and return cleaner SQL without changing any Jinja code. These features will improve over time.

In the future, this package will support more AI tools, including:

automatic SQL fixes

generating dbt documentation

suggesting dbt tests

refactoring large or complex models
@saravanapandic
Copy link
Author

Hi @joellabes and @dbeatty10

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant