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

New response format to support visualization #168

Closed
chloe-zh opened this issue Jul 25, 2021 · 3 comments
Closed

New response format to support visualization #168

chloe-zh opened this issue Jul 25, 2021 · 3 comments
Assignees
Labels
enhancement New feature or request

Comments

@chloe-zh
Copy link
Contributor

Is your feature request related to a problem? Please describe.
The observability visualization uses the SQL plugin as the query engine and consumes the PPL component of this plugin as the search language. The existing protocols are mostly to provide good service for the JDBC/ODBC connectors, but the frontend still needs to do much preprocessing before rendering the visualizations.

Describe the solution you'd like
The detailed proposal is noted in the comments of issue #162

Describe alternatives you've considered
Pending discussion for alternatives.

Additional context
See #162 for details.

@chloe-zh chloe-zh added the enhancement New feature or request label Jul 25, 2021
@chloe-zh chloe-zh self-assigned this Jul 25, 2021
@chloe-zh
Copy link
Contributor Author

chloe-zh commented Oct 22, 2021

@mengweieric @ps48

Actually the format protocol is independent with the search/evaluation result, so the dimensions and axises should not be defined within the format. Instead, I suggest the frontend to gather necessary aggregation information when doing the drag&drop, for example to get the field to be aggregated on, and the name of the aggregated result etc.

The output protocol provides the data columns in the format that frontend can use directly, and the metat data of column names and types.

{
  "data": {
    "count()": [
      53,
      55,
      64,
      63,
      57,
      ...
    ],
    "timestime_span": [
      "2021-07-12 00:00:00",
      "2021-07-12 04:00:00",
      "2021-07-12 08:00:00",
      "2021-07-12 12:00:00",
      "2021-07-12 16:00:00",
      ...
    ]
  },
  "fields": [
    {
      "name": "count()",
      "type": "integer"
    },
    {
      "name": "timestime_span",
      "type": "timestamp"
    }
  ],
  "size": 252,
  "status": 200
}

@chloe-zh
Copy link
Contributor Author

revised:

{
  "data": {
    "count()": [
      53,
      55,
      64,
      63,
      57,
      ...
    ],
    "timestime_span": [
      "2021-07-12 00:00:00",
      "2021-07-12 04:00:00",
      "2021-07-12 08:00:00",
      "2021-07-12 12:00:00",
      "2021-07-12 16:00:00",
      ...
    ]
  },
  "metadata": {
    "fields": [
      {
        "name": "count()",
        "type": "integer"
      },
      {
        "name": "timestime_span",
        "type": "timestamp"
      }
    ]
  },
  "size": 252,
  "status": 200
}

@dai-chen
Copy link
Collaborator

Closing and feel free to reopen if anything else needed. Thanks!

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

No branches or pull requests

2 participants