# How to find out if the sql\_last\_value is correctly interpreted?

**URL:** <https://discuss.elastic.co/t/how-to-find-out-if-the-sql-last-value-is-correctly-interpreted/55917>\
**Category:** Logstash\
**Created:** [July 19, 2016, 6:40pm UTC](https://discuss.elastic.co/t/how-to-find-out-if-the-sql-last-value-is-correctly-interpreted/55917 "2016-07-19T18:40:36Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Ram\_Ibaset](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/ram_ibaset/32/27747_2.png) [@Ram\_Ibaset](https://discuss.elastic.co/u/Ram_Ibaset)\
**Post date:** [July 19, 2016, 6:40pm UTC](https://discuss.elastic.co/t/how-to-find-out-if-the-sql-last-value-is-correctly-interpreted/55917/1 "2016-07-19T18:40:36Z")

</div>

I have created the following logstash config script:  
SELECT a, b, c, last\_updated FROM tablex where cast(last\_updated AS TIMESTAMP) \>=:sql\_last\_value  
How can I find out what the sql\_last\_value is ? i.e. is there a log level that echoes the actual sql executed with the parameter value? like

SELECT a, b, c, last\_updated FROM tablex where cast(last\_updated AS TIMESTAMP) \>='19-JUL-16 12.01.01.000000000 AM'  
Any feedback would be appreciated.

Btw last\_updated is a DATE type field.

---

<div class="post-metadata">

**Author:** ![magnusbaeck](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/magnusbaeck/32/44943_2.png) [@magnusbaeck](https://discuss.elastic.co/u/magnusbaeck)\
**Post date:** [July 22, 2016, 5:45pm UTC](https://discuss.elastic.co/t/how-to-find-out-if-the-sql-last-value-is-correctly-interpreted/55917/2 "2016-07-22T17:45:20Z")

</div>

Well, it's not Logstash that produces such a query by interpreting the parameter so it can't possibly produce that kind of log message. However, it should be able to display the queries made and any parameters passed to it. Try starting Logstash with `--verbose` or `--debug` and see what happens.

---

<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:** [July 6, 2017, 4:46am UTC](https://discuss.elastic.co/t/how-to-find-out-if-the-sql-last-value-is-correctly-interpreted/55917/3 "2017-07-06T04:46:48Z")

</div>

Closed on July 6, 2017, 4:46am UTC


