DataWeave is a CLI tool that converts JSON/YAML to CSV by generating all possible permutations of the provided data.
It’s built in Rust and optimized for high-performance structured data transformation.
TBD
Install DataWeave via Cargo:
cargo install dataweaveOr, if you are working with the repository:
git clone https://github.com/MadeByAe/dataweave.git
cd dataweave
cargo build --releaseConvert a JSON or YAML file into a CSV:
dataweave -f input.yamlThis will generate a `` file in the current directory.
Specify where to save the CSV:
dataweave -f input.json -o output.csv{
"make": ["BMW", "Audi", "Porsche"],
"color": ["Silver", "Black", "White"],
"interior": ["Light", "Dark"]
}
make:
- Audi
- BMW
- Porsche
exterior_color:
- Silver
- Black
- White
interior_color:
- Light
- DarkFor the above JSON/YAML, the output CSV file will contain all possible permutations:
make,exterior_color,interior_color
Audi,Silver,Light
Audi,Silver,Dark
Audi,Black,Light
Audi,Black,Dark
Audi,White,Light
Audi,White,Dark
BMW,Silver,Light
BMW,Silver,Dark
BMW,Black,Light
BMW,Black,Dark
BMW,White,Light
BMW,White,Dark
Porsche,Silver,Light
Porsche,Silver,Dark
Porsche,Black,Light
Porsche,Black,Dark
Porsche,White,Light
Porsche,White,Dark
| Flag | Description | Example |
|---|---|---|
-f, --file |
Input file (JSON/YAML) | -f data.yaml |
-o, --output |
Output CSV file (default: output.csv) |
-o output.csv |
Contributions to DataWeave are welcome! If you have suggestions for improvements or additional utility modules, please feel free to open an issue or submit a pull request on the GitHub repository.
This project is licensed under the MIT License. Feel free to use, modify, and distribute this code according to the terms of the license.
DataWeave is maintained by (Ae) Angel Estrada. For questions or support, please contact angel-estrada.com.
Made with ❤️ in San Francisco