ignite-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Vladimir Ozerov <voze...@gridgain.com>
Subject Re: How to load 2 tables in a cache
Date Thu, 14 Apr 2016 13:46:05 GMT
Could you please provide more detailed error description and its stack
trace?

On Wed, Apr 13, 2016 at 7:03 PM, tusharnakra <tusharnakra@hotmail.com>
wrote:

> OK, UPDATE:
>
> This method is working, but how do I add setArgs (I mean, I want to pass
> the
> argument for orgname as "Ignite" i.e. to only print person names in Ignite
> organization. How to do that??? It's giving error if I simply do as given
> on
> the ignite website:
>
>  private static void sqlFieldsQueryWithJoin() {
>         IgniteCache<AffinityKey<Long>, Person> cache =
> Ignition.ignite().cache("PCache");
>         //String oname = "Barclays";
>         // Execute query to get names of all employees.
>         String sql =
>             "select concat(firstName, ' ', lastName), org.orgname " +
>             "from Person, \"" + ORG_CACHE + "\".Organization as org " +
>             "where Person.orgid = org.orgid";
>
>         QueryCursor<List<?>> cursor = cache.query(new
> SqlFieldsQuery(sql));
>
>         // In this particular case each row will have one element with full
> name of an employees.
>         List<List<?>> res = cursor.getAll();
>
>         // Print persons' names and organizations' names.
>         print("Names of all employees and organizations they belong to:",
> res);
>     }
>
>
>
> --
> View this message in context:
> http://apache-ignite-users.70518.x6.nabble.com/How-to-load-2-tables-in-a-cache-tp4026p4136.html
> Sent from the Apache Ignite Users mailing list archive at Nabble.com.
>

Mime
View raw message