# How to pass url query string value into the elasticsearch SQL query in kibana canvas

**URL:** <https://discuss.elastic.co/t/how-to-pass-url-query-string-value-into-the-elasticsearch-sql-query-in-kibana-canvas/311540>\
**Category:** Kibana\
**Created:** [August 5, 2022, 1:24pm UTC](https://discuss.elastic.co/t/how-to-pass-url-query-string-value-into-the-elasticsearch-sql-query-in-kibana-canvas/311540 "2022-08-05T13:24:06Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![sarvshresht6561](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/sarvshresht6561/32/109309_2.png) [@sarvshresht6561](https://discuss.elastic.co/u/sarvshresht6561)\
**Post date:** [August 5, 2022, 1:24pm UTC](https://discuss.elastic.co/t/how-to-pass-url-query-string-value-into-the-elasticsearch-sql-query-in-kibana-canvas/311540/1 "2022-08-05T13:24:06Z")

</div>

I am new to ELK stack. I am making line graphs in kibana canvas with elastic SQL query as a data source. I am trying to fetch the query string value from the url to the SQL query, but the result of the query is "no documents". i m not sure if the url query string value is injected in the SQL query or not but I am getting "no documents" response. I have no idea what to do next. Am i getting the querystring value in sql query or not? Plz help me out of this situation. Any quick response/solution will be appreciated. Thank you.  
URL: [http://localhost:5601/app/canvas?username=username-1#/workpad/workpad-ff8a53f3-325e-49bd-8146-df482b8fa590/page/1](http://localhost:5601/app/canvas?username=username-1#/workpad/workpad-ff8a53f3-325e-49bd-8146-df482b8fa590/page/1)

SQL query: SELECT time,username,bytesIn+bytesOut as data\_consumed,status from data\_consumed\_active\_connection where username='"{urlparam param=username}"' order by time

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [September 2, 2022, 1:24pm UTC](https://discuss.elastic.co/t/how-to-pass-url-query-string-value-into-the-elasticsearch-sql-query-in-kibana-canvas/311540/2 "2022-09-02T13:24:27Z")

</div>

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
