It seems that populating and using a scan query works with this setup. Everything except LINQ works with this List as Value.
Thanks, Josh Katz Dodge & Cox | 415-262-7520 From: Pavel Tupitsyn <ptupit...@apache.org> Sent: Wednesday, March 10, 2021 9:15 AM To: user <user@ignite.apache.org> Subject: Re: Using AsCacheQueryable in LINQ to access the cache This is an EXTERNAL EMAIL. Stop and think before clicking a link or opening attachments. > List<ReportingHolding> I think this is the problem. Think of every cache entry as a row in a table. List of custom classes can't be represented as a row, please use a single value instead. On Wed, Mar 10, 2021 at 8:03 PM Josh Katz <josh.katz.contrac...@dodgeandcox.com<mailto:josh.katz.contrac...@dodgeandcox.com>> wrote: I have it configured as the following: CacheConfiguration config = new CacheConfiguration(cacheName, new QueryEntity(typeof(HoldingsCacheKey), typeof(List<ReportingHolding>))) Is it setup correctly for LINQ to work? Thanks, Josh From: Pavel Tupitsyn <ptupit...@apache.org<mailto:ptupit...@apache.org>> Sent: Wednesday, March 10, 2021 12:54 AM To: user <user@ignite.apache.org<mailto:user@ignite.apache.org>> Subject: Re: Using AsCacheQueryable in LINQ to access the cache This is an EXTERNAL EMAIL. Stop and think before clicking a link or opening attachments. Have you configured the QueryEntities [1]? [1] https://ignite.apache.org/docs/latest/SQL/indexes#configuring-indexes-using-query-entities<https://urldefense.proofpoint.com/v2/url?u=https-3A__ignite.apache.org_docs_latest_SQL_indexes-23configuring-2Dindexes-2Dusing-2Dquery-2Dentities&d=DwMFaQ&c=AQ5yCnCZOLz3HYYKvbnj5ppyDxNZuxkzDrQyIFuxC1E&r=Ozo4-O4UhoKMf1pxikLY7_uNBE_1q1uSylIfhTfOzfNeiaeKObKjMvvMvZU36PT2&m=ujk0tdVQC3EPKYi4No5IAo_lIeS3aTrQ50g2wih7SqE&s=AGUSviYnA3aFRA9AgpC0jK3E643EbUKG4ognOZhVNdI&e=> On Wed, Mar 10, 2021 at 2:48 AM Josh Katz <josh.katz.contrac...@dodgeandcox.com<mailto:josh.katz.contrac...@dodgeandcox.com>> wrote: We are trying to query the cache using Ignite.LINQ NUGET package in .NET. Error: IgniteSQLException: Failed to parse query. Table "EquitiesYoY" not found When using AsCacheQueryable with a Where on a key property. We get the following exception that the table is not there even though I can see the cache is in the Cluster with the keys that I want. Source = Apache.Ignite.Core TargetSite = InStreamOutObject Exception: Failed to parse query. Table "EquitiesYoY" not found; SQL statement: select top 1 _T0._VAL from "EquitiesYoY".28076, CULTURE=NEUTRAL, PUBLICKEYTOKEN=3B3B6B1C441C71AA]] as _T0 where (_T0.ACCOUNTID IS NOT DISTINCT FROM ?) [42102-197] InnerException: class org.apache.ignite.IgniteCheckedException: Failed to parse query. Table "EquitiesYoY" not found; SQL statement: select top 1 _T0._VAL from "EquitiesYoY".28076, CULTURE=NEUTRAL, PUBLICKEYTOKEN=3B3B6B1C441C71AA]] as _T0 where (_T0.ACCOUNTID IS NOT DISTINCT FROM ?) [42102-197] at org.apache.ignite.internal.processors.platform.utils.PlatformUtils.unwrapQueryException(PlatformUtils.java:520) at org.apache.ignite.internal.processors.platform.cache.PlatformCache.runFieldsQuery(PlatformCache.java:1376) at org.apache.ignite.internal.processors.platform.cache.PlatformCache.processInStreamOutObject(PlatformCache.java:968) at org.apache.ignite.internal.processors.platform.PlatformTargetProxyImpl.inStreamOutObject(PlatformTargetProxyImpl.java:79) Caused by: javax.cache.CacheException: Failed to parse query. Table "EquitiesYoY" not found; SQL statement: select top 1 _T0._VAL from "EquitiesYoY".28076, CULTURE=NEUTRAL, PUBLICKEYTOKEN=3B3B6B1C441C71AA]] as _T0 where (_T0.ACCOUNTID IS NOT DISTINCT FROM ?) [42102-197] at org.apache.ignite.internal.processors.cache.IgniteCacheProxyImpl.query(IgniteCacheProxyImpl.java:834) at org.apache.ignite.internal.processors.cache.GatewayProtectedCacheProxy.query(GatewayProtectedCacheProxy.java:412) at org.apache.ignite.internal.processors.platform.cache.PlatformCache.runFieldsQuery(PlatformCache.java:1370) ... 2 more Caused by: class org.apache.ignite.internal.processors.query.IgniteSQLException: Failed to parse query. Table "EquitiesYoY" not found; SQL statement: select top 1 _T0._VAL from "EquitiesYoY".28076, CULTURE=NEUTRAL, PUBLICKEYTOKEN=3B3B6B1C441C71AA]] as _T0 where (_T0.ACCOUNTID IS NOT DISTINCT FROM ?) [42102-197] at org.apache.ignite.internal.processors.query.h2.H2Connection.prepareStatementNoCache(H2Connection.java:194) at org.apache.ignite.internal.processors.query.h2.H2PooledConnection.prepareStatementNoCache(H2PooledConnection.java:109) at org.apache.ignite.internal.processors.query.h2.QueryParser.parseH2(QueryParser.java:355) at org.apache.ignite.internal.processors.query.h2.QueryParser.parse0(QueryParser.java:222) at org.apache.ignite.internal.processors.query.h2.QueryParser.parse(QueryParser.java:138) at org.apache.ignite.internal.processors.query.h2.IgniteH2Indexing.querySqlFields(IgniteH2Indexing.java:1071) at org.apache.ignite.internal.processors.query.GridQueryProcessor$4.applyx(GridQueryProcessor.java:2789) at org.apache.ignite.internal.processors.query.GridQueryProcessor$4.applyx(GridQueryProcessor.java:2785) at org.apache.ignite.internal.util.lang.IgniteOutClosureX.apply(IgniteOutClosureX.java:36) at org.apache.ignite.internal.processors.query.GridQueryProcessor.executeQuery(GridQueryProcessor.java:3348) at org.apache.ignite.internal.processors.query.GridQueryProcessor.lambda$querySqlFields$2(GridQueryProcessor.java:2805) at org.apache.ignite.internal.processors.query.GridQueryProcessor.executeQuerySafe(GridQueryProcessor.java:2843) at org.apache.ignite.internal.processors.query.GridQueryProcessor.querySqlFields(GridQueryProcessor.java:2779) at org.apache.ignite.internal.processors.query.GridQueryProcessor.querySqlFields(GridQueryProcessor.java:2706) at org.apache.ignite.internal.processors.cache.IgniteCacheProxyImpl.query(IgniteCacheProxyImpl.java:819) ... 4 more Caused by: org.h2.jdbc.JdbcSQLException: Table "EquitiesYoY" not found; SQL statement: select top 1 _T0._VAL from "EquitiesYoY".28076, CULTURE=NEUTRAL, PUBLICKEYTOKEN=3B3B6B1C441C71AA]] as _T0 where (_T0.ACCOUNTID IS NOT DISTINCT FROM ?) [42102-197] at org.h2.message.DbException.getJdbcSQLException(DbException.java:357) at org.h2.message.DbException.get(DbException.java:179) at org.h2.message.DbException.get(DbException.java:155) at org.h2.command.Parser.readTableOrView(Parser.java:5920) at org.h2.command.Parser.readTableFilter(Parser.java:1430) at org.h2.command.Parser.parseSelectSimpleFromPart(Parser.java:2138) at org.h2.command.Parser.parseSelectSimple(Parser.java:2287) at org.h2.command.Parser.parseSelectSub(Parser.java:2133) at org.h2.command.Parser.parseSelectUnion(Parser.java:1946) at org.h2.command.Parser.parseSelect(Parser.java:1919) at org.h2.command.Parser.parsePrepared(Parser.java:463) at org.h2.command.Parser.parse(Parser.java:335) at org.h2.command.Parser.parse(Parser.java:307) at org.h2.command.Parser.prepareCommand(Parser.java:278) at org.h2.engine.Session.prepareLocal(Session.java:611) at org.h2.engine.Session.prepareCommand(Session.java:549) at org.h2.jdbc.JdbcConnection.prepareCommand(JdbcConnection.java:1247) at org.h2.jdbc.JdbcPreparedStatement.<init>(JdbcPreparedStatement.java:76) at org.h2.jdbc.JdbcConnection.prepareStatement(JdbcConnection.java:694) at org.apache.ignite.internal.processors.query.h2.H2Connection.prepareStatementNoCache(H2Connection.java:191) ... 18 more StackTrace: at Apache.Ignite.Core.Impl.PlatformJniTarget.InStreamOutObject(Int32 type, Action`1 writeAction) at Apache.Ignite.Core.Impl.Cache.CacheImpl`2.Query[T](SqlFieldsQuery qry, Func`3 readerFunc) at Apache.Ignite.Linq.Impl.CacheFieldsQueryExecutor.ExecuteSingle[T](QueryModel queryModel, Boolean returnDefaultWhenEmpty) at Remotion.Linq.Clauses.StreamedData.StreamedSingleValueInfo.ExecuteSingleQueryModel[T](QueryModel queryModel, IQueryExecutor executor) at Remotion.Linq.Clauses.StreamedData.StreamedSingleValueInfo.ExecuteQueryModel(QueryModel queryModel, IQueryExecutor executor) at Apache.Ignite.Linq.Impl.CacheFieldsQueryProvider.Execute[TResult](Expression expression) at DodgeAndCox.Reporting.BIDashboardServices.BIDashboardService.GetCachedHoldings(String accountId, DateTime asOfDate, String accountStyle) in ________________________________ Please follow the hyperlink to important disclosures. https://www.dodgeandcox.com/disclosures/email_disclosure_funds.html