migrating-sql-to-dbt

Convert SQL stored procedures, views, and raw SQL files into dbt models.

Updated Jun 10, 2026
One-click install
npx skills add https://github.com/AltimateAI/altimate-opencode-plugin --skill migrating-sql-to-dbt-altimateai
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: migrating-sql-to-dbt
Source: https://github.com/AltimateAI/altimate-opencode-plugin/tree/main/skills/dbt/migrating-sql-to-dbt
Command: npx skills add https://github.com/AltimateAI/altimate-opencode-plugin --skill migrating-sql-to-dbt-altimateai

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires dbt, and includes scripts (resource) components.

What problem does it solve?

This Skill provides a structured approach to migrate SQL databases to dbt, addressing the challenges of legacy SQL transformation and ensuring a successful transition to dbt's model-driven data pipelines.

Core Features & Use Cases

  • Structured Migration: Guides the conversion of SQL stored procedures, views, and raw SQL files into modular dbt models.
  • Layered Approach: Ensures that each layer of the data pipeline (staging, intermediate, mart) is built and validated sequentially.
  • Automated Checks: Automatically checks for existing models and sources, reducing manual effort.
  • Use Case: Ideal for organizations looking to modernize their data engineering processes and move from SQL to dbt for better data management and scalability.

Quick Start

Use the 'migrating-sql-to-dbt' skill to convert your SQL file 'orders.sql' to a dbt model.

Frequently Asked Questions about migrating-sql-to-dbt

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I convert stored procedures and raw SQL files into dbt models?

To convert SQL to dbt models, this Skill parses stored procedures, views, and raw SQL files, then guides you through structuring them into modular staging, intermediate, and mart layers. It automates checks for existing sources to ensure data consistency.

What is the best way to structure a SQL to dbt migration?

The best way to structure a SQL to dbt migration is by using a layered approach. This Skill sequentially builds and validates staging, intermediate, and mart layers, ensuring your data pipeline transitions successfully from legacy SQL transformations to dbt's model-driven architecture.

Do I need dbt installed to automate SQL database migration?

Yes, you need dbt installed to automate SQL database migration. The Skill requires dbt and SQL parsing capabilities to convert legacy SQL files into modular dbt models and validate the resulting data pipeline layers.

Can I migrate legacy SQL views directly into dbt staging and marts?

Yes, you can migrate legacy SQL views directly into dbt staging and marts. The Skill supports converting existing SQL views and raw files into dbt models, automatically checking for existing models and sources to reduce manual setup effort.

Why does converting SQL stored procedures to dbt require a layered approach?

Converting SQL stored procedures to dbt requires a layered approach to ensure data consistency and modularity. By separating logic into staging, intermediate, and mart layers, the Skill validates each step sequentially, preventing pipeline failures during migration.

What are the limitations of automating SQL to dbt model conversion?

A limitation of automating SQL to dbt conversion is that it depends on SQL parsing capabilities and requires existing dbt infrastructure. Complex stored procedures may need manual adjustments to fit the staging, intermediate, and mart layer structure properly.