Red Hat Training

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

A.2. Designer Metadata Usage Requirements In JBoss Data Virtualization Runtime

Based on the metadata exposed by the Teiid Designer the below table shows which fields are required and how that information is being used in JBoss Data Virtualization runtime.

Table A.2. Data Usage for Tables

TABLE Type In Designer In Metadata API Required Description
FullName String Yes Yes Yes Name of the Table
NameInSource String Yes Yes Yes Name of Table in the source system, for view this can be empty, also used on variety of use cases
Cardinality Integer Yes Yes Yes Cardinality is used to calculate the cost of source node access
TableType Integer Yes Yes Yes Table,View,Document,XmlMappingClass,XmlStagingTable,MaterializedTable
IsVirtual Boolean Yes Yes Yes Used to find if this is source table Vs view
IsSystem Boolean Yes Yes No Only used for System metadata
IsMaterialized Boolean Yes Yes Yes To identify that the table is materialized
SupportsUpdate Boolean Yes Yes Yes To allow updates on the table
PrimaryKeyID String Yes KeyRecord Yes Used for creating indexes on temp tables and to create default update/delete procedures
ForeignKeyIDs Collection Yes List<ForeignKey> Yes Used in Planning of query (rule raise access)
IndexIDs Collection Yes List<KeyRecord> Yes Used for creating indexes on temp tables and in planning (estimate predicate cost)
UniqueKeyIDs Collection Yes List<KeyRecord> Yes Used for query planning
AccessPatternIDs Collection Yes List<KeyRecord> Yes Used for enforcing the criteria on query
MaterializedTableID String Yes Table Yes Reference to Materialization table
insertEnabled Boolean ** Yes Yes Flag for checking insert procedure is enabled for view
deleteEnabled Boolean ** Yes Yes Flag for checking delete procedure is enabled for view
updateEnabled Boolean ** Yes Yes Flag for checking update procedure is enabled for view
Select Transformation String ** Yes Yes Transformation for Select in case of View
Insert Plan String ** Yes Yes Transformation for Insert in case of View
Update Plan String ** Yes Yes Transformation for Update in case of View
Delete Plan String ** Yes Yes Transformation for Delete in case of View
Bindings Collection ** Yes Yes XML Document
SchemaPaths Collection ** Yes Yes XML Document

Table A.3. Data Usage for Columns

COLUMN Type In Designer In Metadata API Required Description
FullName String Yes Yes Yes Name of the column
NameInSource String Yes Yes Yes Name of the column in source system
IsSelectable Boolean Yes Yes Yes Column is allowed in select
IsUpdatable Boolean Yes Yes Yes Column is allowed in Update/Insert/Delete
NullType Integer Yes Yes Yes Used for validation if null value allowed
IsAutoIncrementable Boolean Yes Yes Yes During insert used to validate if a value is required or not
IsCaseSensitive Boolean Yes Yes ?? ??
IsSigned Boolean Yes Yes ?? Used in System Metadata
IsCurrency Boolean Yes Yes No Only used for System metadata
IsFixedLength Boolean Yes Yes No Only used for System metadata
IsTranformationInputParameter Boolean Yes ?? ?? ??
SearchType Integer Yes Yes Yes Used for defining the capability of the source
Length Integer Yes Yes ?? Used in System Metadata
Scale Integer Yes Yes ?? Used in System Metadata
Precision Integer Yes Yes ?? Used in System Metadata
CharOctetLength Integer Yes Yes No only used for System metadata
Radix Integer Yes Yes ?? Used in System Metadata
DistinctValues Integer Yes Yes Yes Used for cost calculations, System metadata
NullValues Integer Yes Yes Yes Used for cost calculations, System metadata
MinValue String Yes Yes Yes Used for cost calculations, System metadata
MaxValue String Yes Yes Yes Used for cost calculations, System metadata
Format String Yes Yes No Only used for System metadata
RuntimeType String Yes DataType Yes Data Type
NativeType String Yes Yes Yes Translators can use this field to further plan
DatatypeObjectID String Yes ?? ??  
DefaultValue String Yes Yes Yes Used for Insert and procedure execute operations when the values are not supplied
Position Integer Yes Yes Yes Used in the index calculations

Table A.4. Data Usage for Primary Keys

PRIMARY KEY Type In Designer In Metadata API Required Description
FullName String     See the KeyRecord, See Table
NameInSource String     
ColumnIDs Collection     
ForeignKeyIDs Collection     Extends KeyRecord

Table A.5. Data Usage for Unique Keys

UNIQUE KEY Type In Designer In Metadata API Required Description
FullName String     See the KeyRecord, See Table
NameInSource String     
ColumnIDs Collection     
ForeignKeyIDs Collection     

Table A.6. Data Usage for Indexes

INDEX Type In Designer In Metadata API Required Description
FullName String     See the KeyRecord, See Table
NameInSource String     
ColumnIDs Collection     

Table A.7. Data Usage for Access Patterns

ACCESS PATTERNS Type In Designer In Metadata API Required Description
FullName String     See the KeyRecord, See Table
NameInSource String     
ColumnIDs Collection     

Table A.8. Data Usage for Result Sets

RESULT SET Type In Designer In Metadata API Required Description
FullName String     See DataType
NameInSource String     
ColumnIDs Collection     

Table A.9. Data Usage for Foreign Keys

FOREIGN KEY Type In Designer In Metadata API Required Description
FullName String     See the KeyRecord, See Table
NameInSource String     
ColumnIDs Collection     
UniqueKeyID String     

Table A.10. Data Usage for Data Types

DATA TYPE Type In Designer In Metadata API Required Description
FullName String    No Only used for System metadata
NameInSource String    No Only used for System metadata
Length Integer    No Only used for System metadata
PrecisionLength Integer    No Only used for System metadata
Scale Integer    No Only used for System metadata
Radix Integer    No Only used for System metadata
IsSigned Boolean    No Only used for System metadata
IsAutoIncrement Boolean    No Only used for System metadata
IsCaseSensitive Boolean    No Only used for System metadata
Type Integer    No Only used for System metadata
SearchType Integer    No Only used for System metadata
NullType Integer    No Only used for System metadata
JavaClassName String    Yes Maps to runtime type based on java class name
RuntimeTypeName String    No Only used for System metadata
DatatypeID String    No Only used for System metadata
BaseTypeID String    No Only used for System metadata
PrimitiveTypeID String    No Only used for System metadata
VarietyType Integer    No Only used for System metadata
VarietyProps Collection    No Only used for System metadata

Table A.11. Data Usage for Procedures

PROCEDURE Type In Designer In Metadata API Required Description
FullName String Yes Yes Yes Name of the column
NameInSource String Yes Yes Yes Name of the column in source system
IsFunction Boolean   Yes Yes Determines if this function
IsVirtual Boolean   Yes Yes If Function then UDF else stored procedure
ParametersIDs Collection   Yes Yes Parameter List
ResultSetID String   Yes Yes Result set columns
UpdateCount Integer   Yes Yes Update count defines the number of sources being updated, only applicable for virtual procedures

Table A.12. Data Usage for Procedure Parameters

PROCEDURE PARAMETER Type In Designer In Metadata API Required Description
ObjectID String     Same as Column
FullName String     Same as Column
nameInSource String     Same as Column
defaultValue String     Same as Column
RuntimeType String     Same as Column
DatatypeObjectID String     Same as Column
Length Integer     Same as Column
Radix Integer     Same as Column
Scale Integer     Same as Column
NullType Integer     Same as Column
Precision Integer     Same as Column
Position Integer     Same as Column
Type String    Yes Defines parameter is IN/OUT/RETURN
Optional Boolean    No Defines if the parameter is optional or not, only used system metadata

Table A.13. Data Usage for SQL Transformations

SQL TRANSFORMATION(**) Type In Designer In Metadata API Required Description
VirtualGroupName String Yes No Yes See Table, the properties defined on Table
TransformedObjectID String Yes No Yes See Table, the properties defined on Table
TransformationObjectID String Yes No Yes See Table, the properties defined on Table
TransformationSql String Yes No Yes See Table, the properties defined on Table
Bindings Collection Yes No Yes See Table, the properties defined on Table
SchemaPaths Collection Yes No Yes See Table, the properties defined on Table

Table A.14. Data Usage for VDBs

VDB Type In Designer In Metadata API Required Description
FullName String Yes vdb.xml Yes Name of the VDB
NameInSource String ?? No No Not required
Version String Yes vdb.xml Yes VDB version
Identifier String Yes No No Not required
Description String Yes vdb.xml No Used by System metadata
ProducerName String Yes No No Not required
ProducerVersion String Yes No No Not required
Provider String Yes No No Not required
TimeLastChanged String Yes No No Not required
TimeLastProduced String Yes No No Not required
ModelIDs Collection Yes vdb.xml Yes Defines the model list in a VDB

Table A.15. Data Usage for Annotations

ANNOTATION Type In Designer In Metadata API Required Description
FullName String Yes Yes No System metadata, as description on procedure parameter
NameInSource String Yes No No Not required
Description String Yes No No Not required