redash icon indicating copy to clipboard operation
redash copied to clipboard

make json ds support nested path query

Open gaecoli opened this issue 1 year ago • 2 comments

What type of PR is this?

  • [ ] Refactor
  • [x ] Feature
  • [ ] Bug Fix
  • [ ] New Query Runner (Data Source)
  • [ ] New Alert Destination
  • [ ] Other

Description

How is this tested?

  • [ x] Unit tests (pytest, jest)
  • [ ] E2E Tests (Cypress)
  • [ ] Manually
  • [ ] N/A

Related Tickets & Documents

Mobile & Desktop Screenshots/Recordings (if there are UI changes)

gaecoli avatar May 06 '24 04:05 gaecoli

There is no rush to merge this branch. We should listen to users’ suggestions and provide guidance to satisfy users.

https://github.com/getredash/redash/discussions/6938

gaecoli avatar May 06 '24 04:05 gaecoli

compiled pr as docker image and tested and can now traverse nested json, e.g. as per original comment #6938 with example json, can now for instance set path: data.0.awarded.0 to access the awarded array, however it currently only returns 1 record, e.g. if calling api would usually return 100 awarded array objects then i'd expect setting the path as above to return them all when i run the query in redash.

SmallStrayFox avatar May 08 '24 12:05 SmallStrayFox