-
Notifications
You must be signed in to change notification settings - Fork 17
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support jq-like filtering and transformation #1
Comments
We started collecting some ideas about this at [1] and started a discussion topic dedicated to further development of [1] https://community.panodata.org/t/tools-for-processing-json/65 |
When it comes to JSON transformations, I have been loving Jsonata. The syntax is terse and powerful although sometimes hard to remember. It is also extensible by adding custom functions. Another option would be to use JMESPATH, which is what is used in the aws-cli to transform the responses from various commands. I am not aware of a javascript implementation. |
Dear Mark, thanks for bringing up JSONata in this context. I recently stumbled upon it as well [1] and liked it on a first glimpse. Thanks also for suggesting JMESPath. Feel free to come up with a respective implementation based on whatever you might like most. With kind regards, [1] https://community.panodata.org/t/jsonata-json-query-and-transformation-language/64 |
I just discovered an interesting technique to interactively override application settings when they are originally stored in a YAML file, using limactl start --set='.cpus = 2 | .memory = "2GiB"' |
Hi again. We've built upon various ideas and experiences per Zyp Transformations, not exclusively coming from needs in grafana-wtf, but it could be used here as well on a future iteration.
@markmelville: JMESPath became a first citizen of transformation languages in Zyp, as a companion to jqlang, and that is due to your excellent hint, see those snippets located within the rules:
- expression: records[?not_null(meta.location) && !starts_with(meta.location, 'N')]
type: jmes
rules:
- expression: .[] |= (.data.value /= 100)
type: jq Thanks! |
@markmelville: There is a Python implementation for JSONata by @rayokota. I will also consider adding this to Zyp on another iteration, when possible. 🍀 |
It would be cool to support something like the jq query and transformation language for querying and filtering data requested from the Grafana API, like outlined within grafana/simple-json-datasource#111.
The text was updated successfully, but these errors were encountered: