Skip to content
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

JQ Function does not allow object / array destructuring afterwards #1748

Closed
brian-mulier-p opened this issue Jul 13, 2023 · 0 comments · Fixed by #1749
Closed

JQ Function does not allow object / array destructuring afterwards #1748

brian-mulier-p opened this issue Jul 13, 2023 · 0 comments · Fixed by #1749
Assignees
Labels
bug Something isn't working enhancement New feature or request

Comments

@brian-mulier-p
Copy link
Member

Expected Behavior

No response

Actual Behaviour

The given flow is not working since JQ filter requires a JsonNode to do its thing (which we get using Jackson readTree). We should transform resulting ObjectNodes / ArrayNodes into Map / List to allow Pebble reading attributes down the line

Steps To Reproduce

No response

Environment Information

  • Kestra Version:
  • Operating System (OS / Docker / Kubernetes):
  • Java Version (If not docker):

Example flow

id: jq
namespace: io.kestra.bmu
tasks:

  • id: json
    type: io.kestra.core.tasks.debugs.Return
    format: |
    {
    "name": "test",
    "checks": [
    { "table": "worker" },
    { "table": "employee" }
    ]
    }

  • id: log_test
    type: io.kestra.core.tasks.log.Log
    message: |
    {% for check in outputs['json'].value | jq('.checks[]') %}
    {{ check.table }}
    {% endfor %}

@brian-mulier-p brian-mulier-p added bug Something isn't working enhancement New feature or request labels Jul 13, 2023
@brian-mulier-p brian-mulier-p self-assigned this Jul 13, 2023
@github-project-automation github-project-automation bot moved this to Backlog in All issues Jul 13, 2023
@github-project-automation github-project-automation bot moved this from Backlog to Done in All issues Jul 13, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working enhancement New feature or request
Projects
No open projects
Archived in project
Development

Successfully merging a pull request may close this issue.

1 participant