You can create an entity by importing data from an ODBC-compliant relational database.
Before you issue the createentity
command, create a loader connection
for the ODBC-compliant data source. The loader connection specifies where the data
source files are located and allows the createentity
command to connect
to the data source and initiate the entity creation process. (For information about
creating a loader connection, see Loader
Connections.)
Syntax
createentity <loader_connection> username <username> password <password> table <table_name>
where,
<loader_connection> |
Name assigned by the repository administrator to the loader connection. |
<username> |
User ID required to validate the connection to the data source. You must always provide the username and password parameters when importing data from a relational database that uses an ODBC connection. |
<password> |
Password required to validate the connection to the data source. |
<table_name> |
Name of the relational database table to be imported. |
Optional Parameters
Parameter |
Description |
---|---|
jobname <job_name> |
Job ID or name of the data load job. |
columns <names> |
Indicates the names of the columns from which to import data. |
skip <number> |
Number of rows to skip before starting to import data rows. All rows after the skipped rows will be loaded to the repository. For example, if your file has 300 rows and you select to skip the first 99, the system will load 200 rows, starting with the 100th row. |
first <number> |
Number of records from the beginning of the file to load (for example, the first 1000 records). |
random <percentage> |
The degree to which you want to randomly sample a percentage of records from the file. |
Example
This command connects to an ODBC-compliant database and creates a dynamic entity for three columns in the Pilgrim Fund portfolio table.
createentity odbcconn username odbcuser password odbcpwd table pilgrimfdfolio columns {stocks bonds {mutual funds}}
When multiple columns are represented within a space-delimited line of column names, be sure to enclose them in braces ({}). If a column name contains white space, enclose the column name in braces ({}) also.