Red Hat Training

A Red Hat training course is available for Red Hat JBoss Data Virtualization

E.8. VDB Editor

E.8.1. VDB Editor

A VDB, or virtual database is a container for components used to integrate data from multiple data sources, so that they can be accessed in a federated manner through a single, uniform API. A VDB contains models, which define the structural characteristics of data sources, views, and Web services. The VDB Editor, provides the means to manage the contents of the VDB as well as its deployable (validation) state.
The VDB Editor, shown below, contains a upper and lower panels. The upper panel contains the Models tab and an Other Files tab. The lower panel contains tabs for managing Data Roles, the VDB Description and Translator Overrides.
VDB Editor

Figure E.19. VDB Editor

You can manage your VDB contents by using the Add or Remove models via the buttons at the right.
Set individual model visibility via the Visibility checkbox for each model. This provides low level data access security by removing specific models and their metadata contents from schema exposed in GUI tools.
In order for a VDB to be fully queryable the Source Name, Translator, and JNDI Names must have valid values and represent deployed artifacts on your JBoss Data Virtualization server.
If you have Teiid Designer runtime plugins installed, and have a JBoss Data Virtualization server running, you can select a source model in the VDB Editor and right-click select Change Translator or Change JNDI Data Source which will allow you to select any applicable artifacts on your server.
Change Translator or Data Source Actions

Figure E.20. Change Translator or Data Source Actions

If you have a default JBoss Data Virtualization server instance defined and connected the translator and JNDI table cells will contain drop-down lists of available translator and JNDI names available on that server.

E.8.2. Editing Data Roles

Teiid Designer provides a means to create, edit and manage data roles specific to a VDB. Once deployed within a JBoss Data Virtualization server with the security option turned on (by default) any query run against this VDB via a Teiid JDBC connection will adhere to the data access permissions defined by the VDB's data roles.
The VDB Editor contains a VDB Data Roles section consisting of a List of current data roles and New..., Edit... and Remove action buttons.
VDB Data Roles Panel

Figure E.21. VDB Data Roles Panel

Clicking New... or Edit... will launch the New VDB Data Role editor dialog. Specify a unique data role name, add a optional description and modify the individual model element CRUD values by selecting or clearing entries in the models section.
VDB Data Roles Tab

Figure E.22. VDB Data Roles Tab

E.8.3. Editing Translator Overrides

Teiid Designer provides a means to create, edit and manage translator override properties specific to a VDB via the Translator Overrides tab. A translator override is a set of non default properties targeted for a specific source model's data source. So each translator override requires a target translator name like oracle, db2, mysql, etc. and a set of non-default key-value property sets.
The VDB Editor contains a Translator Overrides section consisting of a List of current translator overrides on the left, a properties editor panel on the right and Add (+) and Remove (-) action buttons on the lower part of the panel.
VDB Translator Overrides Tab

Figure E.23. VDB Translator Overrides Tab

To override a specific translator type, click the add translator action (+). If a default JBoss Data Virtualization server instance is connected and available the Add Translator Override dialog (below) is displayed, select an existing translator type and click OK. Note that the override is only applicable to sources within the VDB, so be sure and select a translator type that corresponds to one of the VDB's source models. The properties panel on the right side of the panel will contain editable cells for each property type based on the datatype of the property. (i.e. boolean, integer, string, etc.).
Add Translator Override Dialog

Figure E.24. Add Translator Override Dialog

If no default Teiid server instance is available, the Add New Translator Override dialog is displayed. Enter a unique name for the translator override (i.e. oracle_override), a valid translator type name (i.e. oracle) and click OK. The properties panel on the right side of the panel will allow adding, editing and removing key-value string-based property sets. When editing these properties all values will be treated as type string.
Add New Translator Override Dialog

Figure E.25. Add New Translator Override Dialog