- Home
- Skills
- Sfc Gh Dflippo
- Snowflake Dbt Demo
- Dbt Migration Teradata
dbt-migration-teradata_skill
- Python
26
GitHub Stars
1
Bundled Files
2 months ago
Catalog Refreshed
4 months ago
First Indexed
Readme & install
Copy the install command, review bundled files from the catalogue, and read any extended description pulled from the listing source.
Installation
Preview and clipboard use veilstrat where the catalogue uses aiagentskills.
npx veilstrat add skill sfc-gh-dflippo/snowflake-dbt-demo --skill dbt-migration-teradata- SKILL.md14.6 KB
Overview
This skill converts Teradata DDL (views, tables, stored procedures) into production-ready dbt models targeting Snowflake. It generates dbt SQL models, schema.yml documentation and tests, and recommends materialization and incremental strategies. The goal is to preserve business logic while applying dbt best practices and Snowflake syntax.
How this skill works
I inspect the provided Teradata DDL and translate each object into one or more dbt models. I map Teradata data types and functions to Snowflake equivalents, replace procedural constructs with declarative CTE-based models, and emit schema.yml with column descriptions and tests. The output includes a config block (materialization), inline comments noting converted syntax, and architectural notes explaining key decisions.
When to use it
- Converting Teradata views or tables to dbt models for Snowflake
- Migrating Teradata stored procedures into modular dbt models
- Generating schema.yml with tests and documentation for migrated objects
- Translating Teradata-specific syntax (QUALIFY, volatile tables, SET/MULTISET) to Snowflake
- Designing incremental strategies and performance hints for large Teradata tables
Best practices
- Break complex procedures into multiple focused dbt models (staging, core, marts) to improve testability and lineage
- Use view materialization for 1:1 view conversions; use incremental/table for large fact tables and add an updated_at watermark
- Always cast columns explicitly with precision/scale using ::TYPE (e.g., amount::NUMBER(18,2))
- Add dbt tests (not_null, unique, relationships) and document columns in schema.yml for production readiness
- Replace procedural loops with declarative SQL and use Snowflake functions instead of platform-specific macros
Example use cases
- Convert a Teradata view that uses QUALIFY and ROW_NUMBER into a dbt view with an equivalent QUALIFY or windowed CTE
- Migrate a Teradata stored procedure into multiple dbt models: extract, transform, load, with incremental materialization for the final table
- Translate Teradata volatile tables into Snowflake temporary tables and embed their logic into staging models
- Generate schema.yml that includes tests for primary keys, foreign-key relationships, and not-null constraints
- Optimize a large Teradata fact by recommending clustering keys and switching materialization to incremental with merge logic
FAQ
I map Teradata functions to Snowflake equivalents when available and preserve business logic; in rare cases I convert behavior with explicit SQL comments and suggest verification tests.
How do you handle stored procedures with procedural logic?
I refactor procedural code into modular dbt models and CTEs, converting loops and control flow to set-based SQL. If necessary I split logic across multiple models and note any manual review points.