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,
metaandtagsproperties must be moved under aconfigblock. 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
- Always backup your files before running transformations
- Use the default output directory first to test changes
- Once verified, use
-ito 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:
metaandtagsat any nesting level (including insidecolumns)- Existing
configblocks (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:
- Download the latest binary from GitHub Releases
- Make it executable:
chmod +x metamove
- 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
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
49291b9deb03bbc42c49e61137e25dc68dc3318de56fddd50d1fa384a205421b
|
|
| MD5 |
917bf8bbcce10d1ffdeecfe99a62924a
|
|
| BLAKE2b-256 |
fbdccdb299620590c00433b9a3cb08c0e8d7a6f8ff60ea55c41170764cc7e635
|
Provenance
The following attestation bundles were made for metamove-0.4.0.tar.gz:
Publisher:
release.yml on lightdash/metamove
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
metamove-0.4.0.tar.gz -
Subject digest:
49291b9deb03bbc42c49e61137e25dc68dc3318de56fddd50d1fa384a205421b - Sigstore transparency entry: 228311522
- Sigstore integration time:
-
Permalink:
lightdash/metamove@49b27cec13fa3342d3c980f3a0d70e0ec20714ff -
Branch / Tag:
refs/heads/main - Owner: https://github.com/lightdash
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@49b27cec13fa3342d3c980f3a0d70e0ec20714ff -
Trigger Event:
push
-
Statement type:
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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e67aa5d8a8a9904e09f1df80f092c5540f6f7f2457ee4da95ff391d6846c40c1
|
|
| MD5 |
36bf6c35453ef4b8c6b3a99ae14a214a
|
|
| BLAKE2b-256 |
191363f0f225e18eace72481b54e6c88b940e22ab9db4722bfa965fdb493f35d
|
Provenance
The following attestation bundles were made for metamove-0.4.0-py3-none-any.whl:
Publisher:
release.yml on lightdash/metamove
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
metamove-0.4.0-py3-none-any.whl -
Subject digest:
e67aa5d8a8a9904e09f1df80f092c5540f6f7f2457ee4da95ff391d6846c40c1 - Sigstore transparency entry: 228311528
- Sigstore integration time:
-
Permalink:
lightdash/metamove@49b27cec13fa3342d3c980f3a0d70e0ec20714ff -
Branch / Tag:
refs/heads/main - Owner: https://github.com/lightdash
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@49b27cec13fa3342d3c980f3a0d70e0ec20714ff -
Trigger Event:
push
-
Statement type: