The Direct Model tool is used to quickly add a new semantic data model to an existing database that supports direct querying. This option allows users to connect to a server, and select the required tables from an existing database. Pyramid then automatically creates the data model, and uses heuristics to determine the relationships between the tables in the data model.
This is a good option if you want to build a new data model based on a single existing database, and you don't require any complex data manipulation or preparation, and you don't want to edit joins and tables, edit columns, or build hierarchies. This is a good solution for users who want to quickly create a data model based on a database (as opposed to a file), but don't have the need or know-how to manually configure the ETL. Note that the data model can be edited later on from the Advanced Data Flow.
How to Add a Direct Model to an Existing Database
There are two methods to add a data model to an existing database:
- Add a new server: use this option if you want to add a new server and connect to a database on that server.
- Connect to an existing server: choose this option if you want to connect to a database on a server that you're already connected to.
- Also see Direct Model from Discover
From the Model homepage, click the Add Database Model button.
Select the target from the Server Type list.
Enter a display name for the server. Next, enter the server name or IP address and port. This is the network address of the server and is required. Add an instance name only if relevant to your database system.
Under Security, enter your authentication access.
Click the Test Server button to verify a valid connection, and then click Next.
In Schema Display, select the database(s) and tables that you want to use in the new data model, and click Add.
Review the relationships between the tables, and edit as required.
Click Finish. Pyramid will create a new data model on the selected database.
If you're connecting to an existing server (rather than adding a server), open Discover.
Select the required server. From the Databases column, click the Add New Database button (red highlight below).
Select the required database from the drop down list, then select the tables that should be included in the data model. Click update to add the selected tables to the canvas. Click the joins to edit them, and right click on the tables and columns within the tables to edit them.
Click finish to process the data model and open it in Discover
Edit the Data Model
Once the data model has been processed and opened in Discover, click the Model tab to open the data model in the Advanced Data Flow, where edits can be made and complex data preparation can be performed. Click here to learn more.