ignite-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Eduardo Julian <eduardo...@bontix.com>
Subject SQL queries with BinaryObject
Date Wed, 15 Jun 2016 07:50:37 GMT
Hi, everyone.

I found out about the BinaryObject functionality for storing and
manipulating data on Ignite (
http://apacheignite.gridgain.org/docs/binary-marshaller).

I decided to adopt it, in order to reduce the hassle during data-migrations.

However, when I try to do SQL queries on a cache that contains data created
by building BinaryObjects, I get errors saying that the columns I'm
querying are missing.

For example:
Caused by: org.h2.jdbc.JdbcSQLException: Column "IS_ACTIVE" not found; SQL
statement:
SELECT "Cache".BinaryObject._key, "Cache".BinaryObject._val FROM
"Cache".BinaryObject WHERE is_active = true

I imagined that it was because I had migrated from using Java classes, to
directly using BinaryObject, so I set up a QueryEntity with
key java.lang.String, and value org.apache.ignite.binary.BinaryObject, and
added query-fields for all of the fields I'll be using (including
is_active), and yet, I still get the same error.

I looked up on Google, but I've only found examples of ScanQuery with
BinaryObject, but no examples of SqlQuery with BinaryObject (
https://github.com/apache/ignite/blob/master/examples/src/main/java/org/apache/ignite/examples/datagrid/CacheQueryExample.java
).

So I want to ask if it's at all possible to do SQL queries with
BinaryObject, and if so, what might I be missing.

Oh, and I forgot to mention that I'm using setStoreKeepBinary
and withKeepBinary, so I don't think the problem might be with that.

Thanks in advance for the help!

-- 

    Eduardo Julian
*    Chief Science Officer*
    Mobile.1.809.330.4184
    Skype.  eejp1991
        www.bontix.com




This electronic mail  and its attachments may contain confidential or
priviledged information intended only for the address and may be protected
by law; they should not be distributed, used or copied without
authorization. If you have received this email in error,please notify
immediately at 1(809) 330-4184 or send an email to our address:
eduardoejp@bontix.com <lu@bontix.com> the sender and delete this message
and its attachments. As emails may be altered, Bontix is not liable for
messages that have been modified, changed or falsified. Thank you

Este correo electrónico y sus archivos adjuntos pueden contener información
confidencial o privilegiada destinado únicamente para la dirección y puede
ser protegido por la ley y no deben ser distribuidos, utilizados o copiados
sin autorización. Si usted ha recibido este mensaje por error, por favor
notifique inmediatamente al 1(809) 330-4184 o envíe un correo electrónico a
nuestra dirección: eduardoejp@bontix.com <lu@bontix.com> al remitente y
borre este mensaje y sus anexos. Como correos electrónicos pueden ser
alterado, Bontix no se hace responsable de los mensajes que se han
modificado, cambiado o falsificados. Gracias

Mime
View raw message