# Issue in casting uuid

**URL:** <https://discuss.elastic.co/t/issue-in-casting-uuid/176921>\
**Category:** Logstash\
**Created:** [April 15, 2019, 2:09pm UTC](https://discuss.elastic.co/t/issue-in-casting-uuid/176921 "2019-04-15T14:09:11Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Anup\_Kurup](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/anup_kurup/32/44174_2.png) [@Anup\_Kurup](https://discuss.elastic.co/u/Anup_Kurup)\
**Post date:** [April 15, 2019, 2:09pm UTC](https://discuss.elastic.co/t/issue-in-casting-uuid/176921/1 "2019-04-15T14:09:11Z")

</div>

Hi,  
I have a cassandra table with id column having datatype as uuid. Now i want to select records from the table but it is giving error as uuid is unidentified in jdbc (i am using cassandrajdbc1.1.jar) . So I tried casting id column to varchar but still it not working. My current configuration is as follows:  
jdbc {  
jdbc\_connection\_string =\> ""  
jdbc\_user =\> ""  
jdbc\_password =\> ""  
jdbc\_driver\_library =\> "etc/logstash/configs/cassandrajdbc1.1.jar"  
jdbc\_driver\_class =\> "com.dbschema.CassandraJdbcDriver"  
statement =\> 'select cast(id as varchar(100)) as id, country, "currentStatus", "dateCreated", "dateProcessed", "docCreatedBy", "recordsMatched", "totalRecords" from upload\_excel'  
schedule =\> "\* \* \* \* \*"   
type =\> "uploadexcel"  
}  
and the error I m getting is :-  
[logstash.inputs.jdbc] Exception when executing JDBC query {:exception=\>#\<Sequel::DatabaseError: Java::ComDatastaxDriverCoreExceptions::SyntaxError: line 1:15 missing ')' at 'as' (select cast(id [as] varchar...)\>}

Thanks for the help in advance

---

<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:** [May 13, 2019, 2:09pm UTC](https://discuss.elastic.co/t/issue-in-casting-uuid/176921/2 "2019-05-13T14:09:13Z")

</div>

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