Create a Domain
A metadata domain is a Pentaho term that represents all of the business objects created, stored and used in the metadata layer. A domain may consist of one or more connections, one or more models, security information, business tables, business views, categories, columns and concepts. You can create and save multiple metadata domains using the Metadata Editor.
A metadata domain is accessed through the Pentaho Server by publishing or exporting the domain to an .xmi file, and placing the file in your Pentaho solutions folder.
In summary, a domain represents all of the associated modeled business entities. A domain can be viewed as a metadata “document.” Each solution is restricted to have, at most, one domain. A solution repository can contain multiple solutions. A domain must be published as an .xmi file in the solution repository root. The Metadata Editor works with one domain at time; for example, a “Sales” domain that defines the relationships and entities used by sales team.
When you first launch the Metadata Editor, a new domain is automatically created. You can immediately begin adding connections, tables, columns, and more. If you want to start fresh with a new domain, select File > New > Domain File from the main menu.
There are several procedures associated with creating a new domain.
Set Up a Database Connection
A connection represents connection information of a specific database, and acts as the parent in the hierarchy for all physical tables and physical columns that are defined for that database.
Pentaho metadata models can connect to most common relational databases using JDBC. The Pentaho Metadata Editor (and the Pentaho Metadata Architecture) supports a vast and rich set of data sources. Before you begin defining your business model, you must first describe the database or data source that you would like to model. You do this by defining one or more connections in the editor.
While the current implementation of Pentaho Metadata Editor supports multiple connections and multiple business models in the same domain, each business model must use physical objects (columns and tables) from a single connection only.
Perform the following steps to create a new connection:
- Right-click Connections in the navigation pane.
- Select New Connection.The Database Connection dialog box appears.
- Enter a Connection Name.
- Define your database connection as needed.
- Click Test to ensure that your entries as correct.
- Click OK to save your connection. The list of tables in your database to be imported appear. If you want to find a specific table, enter the table name in the search box or use a regular expression. Select the tables you want to import and click OK or Cancel when you are done.
You do not need to import tables at this point. See Importing Physical Tables and Columns for more information.
Add a New Database Type
First, note the Connection Type list in the dialog box. This is the list of database connections that the Pentaho Metadata Editor and metadata models can support. The list is quite extensive. If you do not see your database in the Connection Type list, you may be able to add it.
To add a new database type, you must copy the JDBC driver archive for your database into the PME install directory
...\metadata-editor\lib. Restart the Pentaho Metadata Editor, and you will see your database in the Connection Type list.
Method of Access
Under Connection Type, you will see the Access list. Defining a JDBC or OBDC connection typically requires all of the remaining fields associated with the General tab to have the correct information. If you are into abstracting those details from your metadata domain, then use the JNDI method of access.
The JNDI access method keeps your server implementation cleaner as well; once you publish your domain to the server, as long as you have defined the JNDI connections with the same names, you still have a good implementation where your database information is only described to the JNDI layer. To take advantage of the JNDI method of access in the Pentaho Metadata Editor, you must define your database connection information in a properties file for the editor.