Import > Import from JDBC Connection
The JDBC import service can be accessed from the Import Tab of Data Assets and Datatypes collections. It connects to a live RDBMS server and uses the JDBC interface to gather metadata from the database.
To use the JDBC import service, the appropriate JDBC driver for the source RDBMS must be installed. See Installing JDBC Drivers.
When importing into a Data Assets collection, the following objects from the database metadata are created:
At least one Physical Data Model and its corresponding Relational Database
Relational Databases contain Database Schemas
Database Schemas contain Database Tables and Database Views
Database Tables contain Database Columns, Unique Constraints, and Foreign Keys
Database Views contain Database Columns
Database Columns specify various properties, including their Physical Datatypes and whether they are part of the table’s primary key
Unique Constraints specify the column(s) within a table that must contain unique values
Foreign Keys specify the column(s) within a table that reference the primary key or unique column(s) in another or the same table
Physical Datatypes define the various database datatypes
To perform a JDBC import, arguments for the following parameters can be specified:
Name: Unique name assigned to the import job.
JDBC URL:
URL used by EDG to connect to the database server. The format and content of the URL is
database platform-specific; for example, the URL for a MySQL connection will
look something like this: jdbc:mysql://localhost:3306/mydb123
.
User Name: A database login with access to the requested tables.
Password: Password for the User Name specified above.
Note
If the password is already in secure storage, it may be omitted.
Catalog pattern:
An optional JDBC-style catalog pattern used to fetch table metadata from the database.
The pattern supports wildcards. The _
character represents any single character;
while the %
character represents any sequence of zero or more characters.
Schema pattern:
An optional JDBC-style schema pattern used to fetch table metadata from the database.
The pattern supports wildcards. The _
character represents any single character;
while the %
character represents any sequence of zero or more characters.
Table pattern:
An optional JDBC-style table pattern used to fetch table metadata from the database.
The pattern supports wildcards. The _
character represents any single character;
while the %
character represents any sequence of zero or more characters.
Default database name: Any object (e.g. a table or foreign key) returned by the database that does not have a JDBC catalog will be assigned the value specified in this field. If no default database name is specified, a system-generated database name will be used.
Default schema name: Any object (e.g. a table or foreign key) returned by the database that does not have a JDBC schema will be assigned the value specified in this field. If no default schema name is specified, a schema will not be added.
Model for Datatype Definitions: The JDBC import will associate each table (or view) column with the Physical Datatype corresponding to the column’s declared datatype. The import will create new datatypes for any types not previously defined. This model specifies where the JDBC import is to look for pre-existing datatypes and where to add any new datatypes encountered. The options are:
Any EDG Datatypes collection included by the Data Assets collection (via Settings > Includes).
The Data Assets collection itself.
For imported datatypes, the recommended practice is to store the datatypes in a separate EDG Datatypes collection rather than in the Data Assets collection itself.
Include data statistics: If enabled, the JDBC import will gather and compute statistics summarizing the data contained in each imported database table, view, and column.
Include data samples: If enabled, the JDBC import will collect sample rows from each imported database table and view.
Note
This option is visible only if the system-wide Allow JDBC Sample Data flag is enabled (see Advanced Parameters Section).
Maximum number of data samples per table: When including data samples, the upper limit of sample rows to collect from each table or view.
Record each new triple in change history: If this checkbox is enabled, the JDBC import will create a change history record for each new triple created as a result of the import. Enabling this checkbox is not recommended for databases that contain a large number of the database objects listed above.
Note
This option is not visible if Manage > Record Triple Counts only is activated.
Cron expression:
The cron
expression for the execution schedule. Leave blank to cancel future executions.
Workflow: The workflow template to use for the import.
See Also
Further Reading on Import > Import from JDBC Connection
Further Reading on TopBraid