opensearch-project / sql

Query your data using familiar SQL or intuitive Piped Processing Language (PPL)
https://opensearch.org/docs/latest/search-plugins/sql/index/
Apache License 2.0
117 stars 137 forks source link

[FEATURE]Materialize external datasource queries results #2597

Open YANG-DB opened 6 months ago

YANG-DB commented 6 months ago

Is your feature request related to a problem?

Today OpenSearch Dashboard can query external datasource (Prometheus ) and show the results in a dedicated UX .

The results are not stored locally but only in the short session of the browser. While this capability is useful for federating multiple (remote) datasources, it has some problems :

The problem with this (local browser results storage) approach is as follows :

This capability is very significant for enabling metrics + traces correlation when metrics are external to opensearch

What solution would you like? In a similar way that the Flint is able to query S3 datasource and store the results locally in opensearch index - the same approach should be taken here.

  1. An external datasource is defined
  2. Materialized indexes are created for this datasource queries metadata and results
  3. PPL query is submitted from the browser (dashboard)
  4. PPL query metadata is saved in the datasource's metadata index
  5. Federated Query Coordinator translate PPL to the remote datasource query and submit query
  6. PPL query results are returned and translated to the expected formant and saved in the datasource's results index
  7. Future PPL queries will be able to use the result index for the purpose of query acceleration and local cache

High level architecture illustration

Screenshot 2024-03-26 at 11 38 58 AM
nitincd commented 6 months ago

Looks like a meaningful expansion of the ability to query data external to OpenSearch. Couple of questions:

vamsi-amazon commented 6 months ago
YANG-DB commented 6 months ago

@vamsi-amazon