Skip to main content

Transform YAML: move meta under config.meta

Project description

MetaMove: Automate Your dbt 1.10 Migration

dbt 1.10 Change: Starting with dbt 1.10, meta and tags properties must be moved under a config block. This tool automates that migration for you.

🎯 What This Does For You

If you're using dbt (Core or Cloud) and upgrading to version 1.10, you'll start seeing deprecation warnings for your YAML files. This is because dbt is changing how meta and tags should be structured in your project files.

Instead of manually updating hundreds of YAML files, MetaMove does it automatically while preserving your comments and formatting.

Before & After Example

Before:

models:
  - name: my_model
    meta:
      owner: "Data Team"
    tags: ["core", "customer"]
    columns:
      - name: id
        meta:
          is_primary_key: true
        tags: ["identifier"]

After:

models:
  - name: my_model
    config:
      meta:
        owner: "Data Team"
      tags: ["core", "customer"]
    columns:
      - name: id
        config:
          meta:
            is_primary_key: true
          tags: ["identifier"]

🚀 Quick Start

The easiest way to install is with pipx:

pip install pipx  # if you don't have it
pipx install metamove
metamove --help

📋 Usage Examples

Basic Usage

Transform a single YAML file into a new directory transformed:

metamove models/my_model.yml # saves to ./transformed/

Transform multiple files into transformed:

metamove models/* models/schema/*

Output Options

By default, transformed files are saved to a transformed directory in your current location so your original files aren't modified:

metamove models/*  # saves to ./transformed/

Instead you can transform files and save to a specific directory:

metamove models/* -o transformed_models

Once you're feeling confident, transform files in place (modify original files):

metamove models/* -i

Working with dbt Projects

The tool automatically processes only .yml and .yaml files, so you can use simple wildcards:

# Transform all YAML files in your dbt project
metamove models/* seeds/* snapshots/*

# Transform all YAML files in nested directories
metamove models/**/*

# Transform specific model directories
metamove models/marts/* models/staging/*

Best Practices

  1. Always backup your files before running transformations
  2. Use the default output directory first to test changes
  3. Once verified, use -i to update files in place

💡 Why Use This?

  • Save Hours: No more manual file editing
  • Zero Risk: Preserves all your comments and formatting
  • Complete: Handles all your YAML files, including nested structures
  • Smart: Intelligently merges existing config blocks
  • Safe: Creates backups before making changes

🔧 Technical Details

The tool handles:

  • meta and tags at any nesting level (including inside columns)
  • Existing config blocks (merges new values in)
  • All YAML types (dict, list, scalar)
  • YAML comments and whitespace formatting
  • Proper placement following dbt precedence rules

📚 Learn More

🤝 Contributing

Found a bug or have an idea? Open an issue or submit a pull request!

🍎 Mac Binary (Coming Soon)

Note: The Mac binary is currently being signed and will be available soon. For now, please use the pipx installation method above.

Once available, Mac users will be able to:

  1. Download the latest binary from GitHub Releases
  2. Make it executable:
    chmod +x metamove
    
  3. Run it:
    ./metamove --help
    

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

metamove-0.4.0.tar.gz (4.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

metamove-0.4.0-py3-none-any.whl (5.7 kB view details)

Uploaded Python 3

File details

Details for the file metamove-0.4.0.tar.gz.

File metadata

  • Download URL: metamove-0.4.0.tar.gz
  • Upload date:
  • Size: 4.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for metamove-0.4.0.tar.gz
Algorithm Hash digest
SHA256 49291b9deb03bbc42c49e61137e25dc68dc3318de56fddd50d1fa384a205421b
MD5 917bf8bbcce10d1ffdeecfe99a62924a
BLAKE2b-256 fbdccdb299620590c00433b9a3cb08c0e8d7a6f8ff60ea55c41170764cc7e635

See more details on using hashes here.

Provenance

The following attestation bundles were made for metamove-0.4.0.tar.gz:

Publisher: release.yml on lightdash/metamove

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file metamove-0.4.0-py3-none-any.whl.

File metadata

  • Download URL: metamove-0.4.0-py3-none-any.whl
  • Upload date:
  • Size: 5.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for metamove-0.4.0-py3-none-any.whl
Algorithm Hash digest
SHA256 e67aa5d8a8a9904e09f1df80f092c5540f6f7f2457ee4da95ff391d6846c40c1
MD5 36bf6c35453ef4b8c6b3a99ae14a214a
BLAKE2b-256 191363f0f225e18eace72481b54e6c88b940e22ab9db4722bfa965fdb493f35d

See more details on using hashes here.

Provenance

The following attestation bundles were made for metamove-0.4.0-py3-none-any.whl:

Publisher: release.yml on lightdash/metamove

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page