5 Replies Latest reply on Jan 22, 2015 7:53 AM by Ramesh Reddy

    Teiid: cannot create materialized view for table

    Viacheslav Muravlev Newbie

      Hi. everybody!

       

      I'm using Teiid 8.8.1 and trying to enable caching for DB table via Teiid materialized view feature. I've got table t_currency (list of available currencies) in PostgreSQL DB and I want to put in in Teiid cache. I've tried 2 ways to do this:

      1. Create new table t_currency_mat with materialzed=true, materializedTable=<null> and relational:NativeQuery=SELECT * FROM t_currency

      2. Set materialized=true for original t_currency table (cannot set it in Teiid Designer GUI, but manually editing appropriate .xmi file does the trick )

       

      In both ways I got the same error when trying to refresh materialized view via query:

      CALL SYSADMIN.refreshMatView(viewname=>'docoper_postgresql.t_currency_mat', invalidate=>true)

      Error:

      TEIID30359 org.teiid.api.exception.query.QueryMetadataException: TEIID30359 QueryPlan could not be found for physical group

       

      If I run any query against these table, it executes successfully, but no cache statistics in Admin Console is updated.

       

      Any help would be greatly appreciated.