2.4. External Materialization and Red Hat JBoss Data Grid
Note
[EAP_HOME]/quickstarts/jdg7.1-remote-cache-materialization quick start.
Important
Important
2.4.1. Materializing a View
You must have two caches and the in Red Hat JBoss Data Grid. (The only needs to be created once because it is shared across all the materializations stored in the Red Hat JBoss Data Grid instance.)
- Using Teiid Designer, click on a view that is to be materialized.
Note
Make sure the view has a primary key defined as the Red Hat JBoss Data Grid source table needs one for updates. Otherwise, you will need to manually create a primary key on each of the new JDG source tables. - Right-click on the view and click ->.
- Enter the and cache names.Optionally, you can change the model name and the directory in which the model is saved.
Note
Red Hat JBoss Data Grid restricts the name of the source model because the protobuf code is based on the Java package naming constraints. The model name becomes the package name in the.protofile. This is due to a limitation in the way that the protobuf is defined. Because Red Hat JBoss Data Grid uses Java, the package name must follow the Java package naming standards. Dashes, for instance, are not allowed. - Click .
- To control the materialization process, update the materialized view extension properties on the above selected view:
- MATVIEW_TTL - to set the refresh rate, in milliseconds
If the materialization management status table is used, then set the following extension properties:- ALLOW_MATVIEW_MANAGEMENT = true
- MATVIEW_STATUS_TABLE = {status table name}
- Create the VDB, using the models needed for materialization.For the JDGSource model, be sure the JNDI is mapped to the JDG data source. Also, enable native queries. To do this, create a translator override for the infinispan-hotrod translator. Click the property and set the value to .
- Deploy the VDB.

Where did the comment section go?
Red Hat's documentation publication system recently went through an upgrade to enable speedier, more mobile-friendly content. We decided to re-evaluate our commenting platform to ensure that it meets your expectations and serves as an optimal feedback mechanism. During this redesign, we invite your input on providing feedback on Red Hat documentation via the discussion platform.