Red Hat Training

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

9.2. VDB Definition: The VDB Element

Attributes

  • name
    The name of the VDB. The VDB name referenced through the driver or datasource during the connection time.
  • version
    The version of the VDB (should be an positive integer). This determines the deployed directory location (see Name), and provides an explicit versioning mechanism to the VDB name.

Property Elements

  • cache-metadata
    Can be "true" or "false". If "false", JBoss Data Virtualization will obtain metadata once for every launch of the VDB. "true" will save a file containing the metadata into the EAP_HOME/MODE/data directory. Defaults to "false" for -vdb.xml deployments otherwise "true".
  • query-timeout
    Sets the default query timeout in milliseconds for queries executed against this VDB. 0 indicates that the server default query timeout should be used. Defaults to 0. Will have no effect if the server default query timeout is set to a lesser value. Note that clients can still set their own timeouts that will be managed on the client side.
  • lib
    Set to a list of modules for the VDB classpath for user defined function loading. See also Support for Non-Pushdown User Defined Functions in Red Hat JBoss Data Virtualization Development Guide: Server Development.
  • security-domain
    Set to the security domain to use if a specific security domain is applicable to the VDB. Otherwise the security domain list from the transport will be used.
    <property name="security-domain" value="custom-security" />
    

    Important

    An administrator needs to configure a matching "custom-security" login module in the standalone.xml configuration file before the VDB is deployed.
  • connection.XXX
    This is for use by the ODBC transport and OData. They use it to set the default connection/execution properties. Note that the properties are set on the connection after it has been established.
    <property name="connection.partialResultsMode" value="true" />
    
  • authentication-type
    Authentication type of configured security domain. Allowed values currently are (GSS, USERPASSWORD). The default is set on the transport (typically USERPASSWORD).
  • password-pattern
    Regular expression matched against the connecting user's name that determines if USERPASSWORD authentication is used. password-pattern Takes precedence of over authentication-type. The default is authentication-type.
  • gss-pattern
    Regular expression matched against the connecting user's name that determines if GSS authentication is used. gss-pattern Takes precedence of over password-pattern. The default is password-pattern.
  • model.visible
    Used to override the visibility of imported vdb models, where model is the name of the imported model..
  • include-pg-metadata
    By default, PG metadata is always added to VDB unless System Properties set property org.teiid.addPGMetadata to false. This property enables adding PG metadata per VDB. Please note that if you are using ODBC to access your VDB, the VDB must include PG metadata..
  • lazy-invalidate
    By default TTL expiration will be invalidating - see Internal Materialization. Setting lazy-invalidate to true will make ttl refreshes non-invalidating.

import-vdb Element

  • name
    The name of the VDB to be imported.
  • version
    The version of the VDB to be imported (should be an positive integer).
  • import-data-policies
    Optional attribute to indicate whether the data policies should be imported as well. Defaults to "true".

Model Element

  • name
    The name of the model is used as a top level schema name for all of the metadata imported from the connector. The name should be unique among all Models in the VDB and should not contain the '.' character.
  • visible
    By default this value is set to "true", when the value is set to "false", this model will not be visible to when JDBC metadata queries. Usually it is used to hide a model from client applications that should not directly issue queries against it. However, this does not prohibit either client application or other view models using this model, if they knew the schema for this model.

Property Elements

  • Important

    All properties are available as extension metadata on the corresponding Schema object that is accessible via the metadata API.
    cache-metadata
    Can be "true" or "false". defaults to "false" for -vdb.xml deployments otherwise "true". If "false", Teiid will obtain metadata once for every launch of the vdb. "true" will save a file containing the metadata into the PROFILE/data/teiid directory Can be used to override the vdb level cache-metadata property.

Source Element

  • Note

    A source is a named binding of a translator and connection source to a model.
    name
    The name of the source to use for this model. This can be any name you like, but will typically be the same as the model name. Having a name different than the model name is only useful in multi-source scenarios. In multi-source, the source names under a given model must be unique. If you have the same source bound to multiple models it may have the same name for each. An exception will be raised if the same source name is used for different sources.
    translator-name
    The name or type of the Red Hat JBoss Data Virtualization Translator to use. Possible values include the built-in types (ws, file, ldap, oracle, sqlserver, db2, derby, etc.) and translators defined in the translators section.
    connection-jndi-name
    The JNDI name of this source's connection factory. There should be a corresponding "-ds.xml" file that defines the connection factory in the JBoss AS. Check out the deploying VDB dependencies section for info. You also need to deploy these connection factories before you can deploy the VDB.

Property Elements

  • importer.[propertyname]
    Property to be used by the connector importer for the model for purposes importing metadata. See possible property name/values in the Translator specific section. Note that using these properties you can narrow or widen the data elements available for integration.

Metadata Element

  • Note

    The optional metadata element defines the metadata repository type and optional raw metadata to be consumed by the metadata repository.
    type
    The metadata repository type. Defaults to INDEX for Designer VDBs and NATIVE for non-Designer VDB source models. For all other deployments/models a value must be specified. Built-in types include DDL, NATIVE, INDEX, and DDL-FILE. The usage of the raw text varies with the by type. NATIVE and INDEX (only for Designer VDBs) metadata repositories do not use the raw text. The raw text for DDL is expected to be be a series of DDL statements that define the schema - see also DDL Metadata. DDL-FILE (used only with zip deployments) is similar to DDL, except that the raw text specifies an absolute path relative to the vdb root of the location of a file containing the DDL. See also Custom Metadata Repository. Use more than 1 metadata element to define multiple sources of metadata.

Translator Element

  • name

    Note

    The name of the translator. This is referenced by the source element.
    type
    The base type of the translator. Can be one of the built-in types (ws, file, ldap, oracle, sqlserver, db2, derby, and so forth).

Property Elements

  • Set a value that overrides a translator default property. See possible property name/values in the Translator-specific section.