JBoss.orgCommunity Documentation

Chapter 5. Importers

5.1. Import DDL
5.2. Import From Relational Database
5.2.1. Relational Model Costing
5.3. Import From Teiid Data Source Connection
5.4. Import From Flat File Source
5.5. Import From XML Data File Source
5.6. Import From Salesforce
5.7. Import Metadata From Text File
5.7.1. Import Relational Model (XML Format)
5.7.2. Import Relational Tables (CSV Format)
5.7.3. Import Relational View Tables (CSV Format)
5.8. Import WSDL into Relational Models
5.8.1. Circular References in WSDL Schemas
5.9. Import Data From REST Service
5.10. Import Data From SOAP Service
5.11. Import WSDL Into Web Service
5.11.1. Import WSDL From Workspace Location
5.11.2. Import WSDL From File System Location
5.11.3. Import WSDL From URL
5.12. Import from an XML Schema File
5.13. Import From an LDAP Server

The Import Wizard provides a means to create a model based on the structure of a data source, to convert existing metadata (i.e. WSDL or XML Schema) into a source model or to load existing metadata files into the current VDB.

To launch the Import Wizard, choose the File > Import action or select a project, folder or model in the tree and right-click choose "Import..."

Import Wizard

Figure 5.1. Import Wizard


Source relational models can be created by importing DDL.

During the Finish processing, a monitor will be displayed providing feedback on the import progress.


The Teiid Connection >> Source Model import option provides a means to create relational source models from relational and other deployed data sources that are not supported by other Teiid Designer importers.

NOTE: To launch this importer, you must have at minimum a Teiid 8.x server running in Designer. The Teiid importer deploys a dynamic VDB to Teiid containing the selected source type, then the schema (as determined by Teiid) is retrieved. We expect to move towards this type of import in future versions of Teiid Designer.

When your import is finished your source model will be opened in an editor and show a diagram containing the your getTextFiles() procedure.


In addition, the view model will be opened in an editor and will show the generated view tables containing the completed SQL required to access the data in your flat file using the "getTextFiles" procedure above and the Teiid TEXTTABLE() function. The following figure is an example of a generated view table.


When finished, the new or changed relational model's package diagram will be displayed showing your new tables.


You can turn your WSDL file (local or URL) into a queryable relational procedures that represent your desired request and response web service structure defined through your WSDL's schema definition. This importer is accessed by launching Eclipse's "Import..." action and selecting the "Teiid Designer > WSDL File or URL >> Source and View Model (SOAP)" option. Web Services Connection Profile defined by a WSDL file in your workspace or defined by a URL. Designer will interpret the WSDL, locate any associated or dependent XML schema files, generate a physical model to invoke the service, and generate virtual models containg procedures to build and parse the XML declared as the service messages.

In the Model Explorer you can see the importer created the following a single physical model containing a single procedure called invoke. This model and procedure correspond to the single port declared in the WSDL.

A single view model was also created containing your new procedures named after the operations declared in the WSDL. For each operation a wrapper procedure was created which can be previewed in Designer. Below is an example dependency diagram showing the sources for the wrapper procedure as request, response procedures and the invoke() source procedure.


You can create a Web Service model by selecting a WSDL file in your workspace, importing WSDL files from the file system or by defining a URL. The Teiid Designer will interpret the WSDL, locate any associated or dependent XML Schema files, generate an XML View of the schema components and create a Web Service model representing the interfaces and operations defined in the WSDL.

Detailed steps for each of these options is described below, as well as a description of how the wizard handles WSDL errors.

In order to successfully generate Web Services from WSDL, the WSDL must be error free. WSDL validation is performed during Step 3 above. If errors do exist, a error summary dialog will be displayed (shown below) and you will not be able to Finish the wizard until the WSDL problems are fixed or you re-import and select a valid WSDL file.


In order to successfully generate Web Services from WSDL, the WSDL must be error free. WSDL validation is performed during Step 3 above. If errors do exist, a error summary dialog will be displayed (shown below) and you will not be able to Finish the wizard until the WSDL problems are fixed or you re-import and select a valid WSDL file.


In order to successfully generate Web Services from WSDL, the WSDL must be error free. WSDL validation is performed during Step 3 above. If errors do exist, a error summary dialog will be displayed (shown below) and you will not be able to Finish the wizard until the WSDL problems are fixed or you re-import and select a valid WSDL file.


The Lightweight Directory Access Protocol, or LDAP, is a network protocol for accessing directory services over TCP/IP. A directory contains a collection of related data, organized hierarchically in a tree format. Each node in the tree is a directory entry, and each entry consists of a set of attribute-value pairs. Each directory entry has a unique identifier, known as its Distinguished Name (DN). The DN consists of a Relative Distinguished Name (RDN), constructed from an attribute from the entry itself, followed by the parent entry’s DN.

In Teiid Designer, an LDAP Server can be modelled by doing the following:

The LDAP metadata is modeled using the relational metamodel. Each table in the relational model represents a directory entry while each row in the table represents a child entry of the directory entry. Each column of the table represents an attribute of the child entry that may exist. In general, each table and column defines the LDAP-specific information in the property “Name In Source”. This allows the connector to identify the attribute or Base DN name within the data source, ie. within LDAP. The actual name of the table and column can differ from the name in source, allowing for more descriptive labelling in models and queries.

Once the wizard has completed, the new source model will be created.


The LDAP connector also provides an update capability. However, additional modeling requirements are imposed beyond those required for read-only access. The additional requirements are described below.

  • Supports Update table property - to enable updates, each source model table must have this property set to 'true';
  • Updateable column property - to enable updates, each column in the source model table must have this property set to 'true';
  • Additional required columns:
    • DN - for all update types (INSERT, UPDATE, and DELETE), the distinguished name must be modeled as a column, setting the name in source to dn. For UPDATE and DELETE capability, the DN must be specified in the criteria clause while for INSERT, the DN must be one of the column values to be set.
    • objectClass - for INSERT, the objectclass must be modelled as a column, setting the name in source to objectClass. It must also be one of the column values to be set.
    • additional - each entry defined in the LDAP directory’s schema may also have one or more additional required columns. This is dependent on the LDAP server implementatation so consult the LDAP documentation accordingly.

A selection of example queries:

  • SELECT * FROM LdapModel.People
  • INSERT INTO LdapModel.People (dn, sn, 
    objectclass, Name) VALUES 
    ('cn=JoeYoung,ou=people,dc=example,dc=org','Young','person', 
    'Joe Young')

  • UPDATE LdapModel.People SET 
    PhoneNumber='(314) 299-2999' WHERE 
    DN='cn=JoeYoung,ou=people,dc=example,dc=org'

  • DELETE FROM LdapModel.People WHERE 
    DN='cn=JoeYoung,ou=people,dc=example,dc=org'