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

Support download as JSON File #7058

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open

Conversation

MRKKmrkk
Copy link

What type of PR is this?

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

Description

This PR allows users to download datasets in JSON format.

How is this tested?

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

Download json file Manually

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

image

image

image

@eradman
Copy link
Collaborator

eradman commented Jul 23, 2024

To make this more like "Download CSV" and the others we would only return the query_result.data.colums, not the entire data structure returned by the server:

{
  "query_result": {
    "id": 3,
    "query_hash": "4c17f9caf181346f94b122d1bec7d875",
    "query": "SELECT * FROM pg_stat_statements",
    "data": {
      "columns": [
        {
          "name": "userid",
          "friendly_name": "userid",
          "type": null
        },
        {
          "name": "dbid",
          "friendly_name": "dbid",
          "type": null
        },
...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants