Reverse Engineering Models
You can create a data model from a database or a script using the Reverse Engineering process. This topic walks you through the steps to reverse engineer a Databricks model. While reverse engineering erwin Data Modeler focuses on schema generation rather than data or information.
For detailed description of reverse engineering options, refer to the Reverse Engineering Options topic.
To reverse engineer a model:
-
In erwin Data Modeler (DM), click Actions > Reverse Engineer.
The New Model screen appears. -
Click Logical/Physical and set Database to Databricks.
-
Click Next.
The Reverse Engineering Wizard appears.
-
Click one of the following options:
-
Database: Use this option to reverse engineer a model from your database.
If you click Database, continue to step 5.
-
Script File: Use this option to reverse engineer a model from a script. Selecting this option enables the File field. Click Browse and select the necessary script file.
If you click Script File, see step 13 below.
-
- Click Next.
The Connection tab appears.
-
Enter your User Name and Password.
-
Then, Click Connect.
On successful connection, your connection information is displayed under Recent Connections.
-
Click Next.
The Databases tab appears. It displays a list of available databases.
-
Under Available Databases, select the databases that you want to reverse engineer. Then, click
.
-
Click Next.
The Tables tab appears. It displays a list of available tables in the databases that you selected in step 9. -
Under Available tables, select the tables that you want to reverse engineer. Then, click
.
-
Click Next.
The Option Set tab appears. It displays the default option set. You can either use the default or a custom option set.
-
Click Next.
The Detailed Options tab appears. Set up appropriate options based on your requirement.
-
Click OK.
The reverse engineering process starts.
Once the process is complete, based on your selections, a schema is generated and a model is created.
The following table explains the connection parameters:
Parameter |
Description |
Additional Information |
Connection Type | Specifies the type of connection you want to use. Select Use ODBC Data Source to connect using the ODBC data source that you have defined. Select Use JDBC Connection to connect using JDBC. | |
ODBC Data Source | Specifies the data source to which you want to connect. The drop-down list displays the data sources that are defined on your computer. | This option is available only when Connection Type is set to Use ODBC Data Source. |
Invoke ODBC Administrator | Specifies whether you want to start the ODBC Administrator software and display the Select Data Source dialog. You can then select a previously defined data source, or create a data source. | This option is available only when Connection Type is set to Use ODBC Data Source. |
Connection String |
Specifies the connection string based on your JDBC instance in the following format: jdbc:spark://<server-hostname>:443/default;transportMode=http;ssl=1;httpPath=<http-path> |
This option is available only when Connection Type is set to Use JDBC Connection. For example, jdbc:spark://dbc-64e36c82-9e5d.cloud.databricks.com:443/default;transportMode=http;ssl=1;httpPath=sql/protocolv1/o/2132616201277612/1108-064928-9gy4v7gf |
Along with Databases and Tables, other objects, such as Groups, Relationships, User IDs, and Views are retrieved.
You can view these objects via the model diagram or view their properties via the Model Explorer. Right-click an object and then, click the required Properties option. For example, on the model diagram, right click a table and then, click Table Properties. The Databricks Table Editor appears. You can view the table's CREATE statement on the SQL tab. As seen, the table, family has four columns, address, children, friends, and name.
Copyright © 2023 Quest Software, Inc. |