I’m wondering if I can use a data file to display/chunk a json spec of a product feature, but I’m struggling to figure out how to get my loop to show both the keys and values.
Below is a small sample pipeline spec; pipelines can have a ton of fields:
{
"transform": {
"image": "ubuntu:20.04",
"cmd": [
"/pach-bin/pachtf",
"sql-run",
"snowflake://lb@of28881.us-central1.gcp/ELBY/PUBLIC?warehouse=ELBY",
"json",
"select * from pokedex",
"0000",
"false"
],
"secrets": [
{
"name": "elbypokedexsecret",
"key": "PACHYDERM_SQL_PASSWORD",
"envVar": "PACHYDERM_SQL_PASSWORD"
}
]
},
"input": {
"cron": {
"name": "cron",
"repo": "elbyPokedex_cron",
"spec": "@every 5m",
"overwrite": true,
"start": {
"seconds": 1658849922,
"nanos": 607485096
}
}
},
"reprocessSpec": "until_success"
}
My idea is to do something like the following:
{{ range $.Site.Data.pipelineSpec }}
{{ . }} # to see the whole spec as the json exactly, not just the values
{{ end }}
{{ range $.Site.Data.pipelineSpec.transform }}
{{ . }} # to see the just the transform object and its child keys/values.
{{ end }}
Is this possible? Thanks