Ability to split metadata yaml into files
See original GitHub issueOur use case:
- A few hundred tables
- YAML files manually configured/updated on Git
- CI/CD based on git and the cli-migrations-v2 image
The CLI forces us to have all table configuration in a single tables.yaml file that is a few thousand lines long and… a mess.
We would like to be able to something like this:
/metadata
-- table1.yaml
-- table2.yaml
...
-- tableN.yaml
Which would allow a much easier (and safer) process of development and review.
This might be somewhat related to https://github.com/hasura/graphql-engine/issues/3545, but I’ve been unable to find a PR for that and the CLI fails if you don’t have a tables.yaml file.
Issue Analytics
- State:
- Created 3 years ago
- Reactions:6
- Comments:10 (1 by maintainers)
Top Results From Across the Web
How to split a YAML into multiple files with a proper name
How can I split it using a one-liner AWK script in files first.yaml , second.yaml and third.yaml ? Solution needs to work with...
Read more >Split into files uses `.yml` file ending · Issue #1165 · mikefarah/yq
Describe the bug. Files created by --split-exp use the .yml file ending althoguh yaml is the recommended file ending. Version of yq: 4.24.2...
Read more >Split into multiple files - yq - GitBook
Split documents into files, using index ... This is like the example above, but we'll use $index for the filename. Note that this...
Read more >10 YAML tips for people who hate YAML | Enable Sysadmin
Just write your JSON data into a Python variable, prepend an import statement, and end the file with a simple three-line output statement....
Read more >Project Basics - Quarto
One of the most important features of Quarto Projects is the ability to share YAML metadata options across multiple documents. Shared metadata can...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found

@ferm10n just a standard “file per tracked table/view” would be a huge win over having a single yaml file which is in the thousands of lines long. And the switch is pretty straight forward.
It’s true I’m not considering other .yaml files in the metadata, but I’m personally only invested in having the tables file split up. The rest I can live with being in one file as I don’t rely on them that much.
@ferm10n If I may chime in.
I think a primary candidate for splitting is the “tables.yaml”, as i imagine it is by far the most used file in hasura for the average use case, as all table info, permissions and events go there.
So the directory structure may stay the same for everything else in a hasura project, just the
tables.yamlwould become something like:That would be a quick and easy win I believe, its probably very viable to do that while maintaining backwards compatibility too.