Accessing Variable in openobserve SQL Query
TLDR Shashank was having trouble accessing a variable in a custom SQL query. Hengfei offered a solution, which was shown to work with Shashank's acknowledgement.
Powered by Struct AI
1
7
1mo
Solved
Oct 20, 2023 (1 month ago)
Shashank
Shashank
12:18 PMHi Team, In my openobserve instance under dashboard settings I have created a variable name: test. I want to access this in my customSQL query. Using $test is not working for me. Can someone pls suggest the workaround !!
Hengfei
Hengfei
12:22 PMSQL or PromQL?
Shashank
Shashank
12:23 PMSQL
Hengfei
Hengfei
12:27 PMSELECT histogram(_timestamp) as "x_axis_1", count(_timestamp) as "y_axis_1" FROM "production-eks" where kubernetes_namespace_name='$namespace' GROUP BY x_axis_1 ORDER BY x_axis_1
12:28
Hengfei
12:28 PMjust
$test
12:28
Hengfei
12:28 PMyou need to use
Custom SQL
Shashank
Shashank
12:29 PMThanks it worked I used '$test' in my case.
1
OpenObserve
OpenObserve is an open-source, petabyte-scale observability platform for the cloud native realm, offering a 10x cost reduction and 140x less storage use compared to competitors like Elasticsearch or Splunk. Built in Rust for exceptional performance, it offers comprehensive features like logs, metrics, traces, dashboards, and more | Knowledge Base powered by Struct.AI
Indexed 404 threads (74% resolved)
Similar Threads
Understanding QueryVariables in OpenObserve Dashboard v0.5.1
Gaby questioned the functionality of QueryVariables in the OpenObserve dashboard. Kirtan explained the use and requested feedback to improve. Gaby created an issue for enhancements.
7
4mo
Solved
SQL Query Issues in OpenObserve
Shashank attempted a SQL query in OpenObserve, but faced errors with certain functions. Hengfei confirmed these functions are not currently supported.
6
2mo
Troubleshooting Openobserve Setup with Azure Blob on K8S
David had difficulties setting up Openobserve with Azure Blob in Kubernetes. Prabhat provided guidance and setup values, informing David about possible data transmission delays, which resolved the issue.
10
3w
Solved