You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
As of today, timeline visualization does not support remote data connections, which can be established using the data source feature
Background
OpenSearch Dashboards Timeline is a visualization tool used to create time-series charts and analyze time-series data in OpenSearch. Timeline uses a unique syntax to create time-series visualizations. The syntax includes a chain of commands that are executed in a particular order. More information can be found here
The .opensearch() function in Timeline is one of the most fundamental functions used to query data from OpenSearch indices. It is primarily used to retrieve time series data for visualization. As other functions, .opensearch() function also have multiple parameters. Considering scope of this issue(feature), we will only discuss about index parameter.
Params
index: Specify the OpenSearch index to retrieve data from.
The Timeline expression language allows users to define complex time series calculations and visualizations. The /api/timeline/run endpoint could be used to generate these expressions dynamically based on user input or other parameters. Once a Timeline expression is defined, it needs to be executed to retrieve the time series data and generate the visualization. The /api/timeline/run endpoint likely handles the execution of these expressions and returns the results in a format that can be consumed by client applications.
/api/timeline/run uses data plugin for search and query OpenSearch. Data plugin already have capability to accept dataSourceID and decide client based on context and request.
We need to implement the logic to retrieve data source id from function parameter and pass that data source id while building request before calling search API.
Problem Statement
As of today, timeline visualization does not support remote data connections, which can be established using the data source feature
Background
OpenSearch Dashboards Timeline is a visualization tool used to create time-series charts and analyze time-series data in OpenSearch. Timeline uses a unique syntax to create time-series visualizations. The syntax includes a chain of commands that are executed in a particular order. More information can be found here
The
.opensearch()
function in Timeline is one of the most fundamental functions used to query data from OpenSearch indices. It is primarily used to retrieve time series data for visualization. As other functions,.opensearch()
function also have multiple parameters. Considering scope of this issue(feature), we will only discuss about index parameter.Params
index: Specify the OpenSearch index to retrieve data from.
example:
Proposed Solution:
1] Add an additional parameter to the
.opensearch()
function to specify the data source from which to retrieve the index.2] Modify
/api/timeline/run
APIThe Timeline expression language allows users to define complex time series calculations and visualizations. The
/api/timeline/run
endpoint could be used to generate these expressions dynamically based on user input or other parameters. Once a Timeline expression is defined, it needs to be executed to retrieve the time series data and generate the visualization. The/api/timeline/run
endpoint likely handles the execution of these expressions and returns the results in a format that can be consumed by client applications./api/timeline/run
uses data plugin for search and query OpenSearch. Data plugin already have capability to accept dataSourceID and decide client based on context and request.We need to implement the logic to retrieve data source id from function parameter and pass that data source id while building request before calling search API.
OpenSearch-Dashboards/src/plugins/vis_type_timeline/server/series_functions/opensearch/lib/build_request.js
Lines 107 to 109 in c6b4c34
so the above code would become
The text was updated successfully, but these errors were encountered: