Skip to main content

Transform YAML: move meta under config.meta

Project description

MetaMove: Automate Your dbt 1.10 Migration

⚠️ dbt 1.10 Deprecation Notice: 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

For Mac Users

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

For Everyone Else

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:

metamove models/my_model.yml

Transform multiple files:

metamove models/*.yml models/schema/*.yml

Output Options

Transform files and save to a specific directory:

metamove models/*.yml -o transformed_models

Transform files in place (modify original files):

metamove models/*.yml -i

Working with dbt Projects

Transform all YAML files in your dbt project:

metamove models/*.yml seeds/*.yml snapshots/*.yml

Transform specific model directories:

metamove models/marts/*.yml models/staging/*.yml

Best Practices

  1. Always backup your files before running transformations
  2. Use -o to test changes in a separate directory first
  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!

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.3.1.tar.gz (4.3 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.3.1-py3-none-any.whl (5.4 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for metamove-0.3.1.tar.gz
Algorithm Hash digest
SHA256 93d17bdf3dfaa2ec16c94d00cc5c8279819c7b396795c299b652faa4fe61c3d8
MD5 da148a9396fb157e1dc7fc2c7c0bec25
BLAKE2b-256 310a461612380ae53d44b31e1fd1c28bbec483a69762521a013867d15ad23870

See more details on using hashes here.

Provenance

The following attestation bundles were made for metamove-0.3.1.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.3.1-py3-none-any.whl.

File metadata

  • Download URL: metamove-0.3.1-py3-none-any.whl
  • Upload date:
  • Size: 5.4 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.3.1-py3-none-any.whl
Algorithm Hash digest
SHA256 441385e6828fd1641cb9c076d696ed52f69bd06f9b01adc102db9cd625d6e1d7
MD5 c1208e5b96bc8c85e8a95ed8d95fa636
BLAKE2b-256 afe61b82b3b988e334280d52bbf79c726ac9a163fee2647c35ea9f067cf279d9

See more details on using hashes here.

Provenance

The following attestation bundles were made for metamove-0.3.1-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