server NAME; |
Defines the database to load from when using Oracle with Oracle DBLINKs. Transactions performed with this type of connection are XA transactions. This statement (or the schema statement) must be the first line in the mapping file. If you use the server statement, do not use the schema or directconnect statements. |
schema NAME; |
Defines the data to load when the adaplet tables can be accessed from the 3DSpace database user by prefixing the tables with the schema name. Use this method when the adaplet tables are not remote, but reside in a separate database instance.
Use schema instead of server if you use schema names instead of database links (by setting MX_USE_SCHEMA_NAMES to true in the .ini file(s). This statement (or the server statement) must be the first line in the mapping file. |
item Username USER;
item Password PASS;
item ConnectString CS;
item Driver DRIVER_TYPE; |
Defines a direct connection to establish access to the adaplet tables. This connection provides an alternative to using DBLINKs or when there might be Oracle setup issues.
These transactions are not XA transactions. Commits to 3DSpace and the adaplet database are done separately. For more information, see Direct Connection to the Database. |
item ConnectionPoolSize N; | Defines the number of adaplet direct connections. For more information on calculating this value, see Direct Connection to the Database. |
item casesensitive TRUE|FALSE; | Defines if the adaplet operates in case-sensitive or case-insensitive mode. For more information, see Adaplet Case Sensitivity |
#mode readonly;
#mode readwrite;
mode extend;
#mode migrate; | Defines the mode of operation for the adaplet. Only one of these lines should be valid (mode extend; in this example). The other 3 lines should be commented out as shown here. The operating mode set for an adaplet can change over time. For example, you can change a readwrite adaplet to extend to adjust for changes to the business model. Not all adaplets will support all operating modes. You can change the mode from readonly or readwrite to migrate or extend . Changing the mode from migrate or extend to readonly or readwrite is more difficult and can result in loss of data. Before making this change, you must clear the adaplet vault. This will not affect data in the foreign database, but it removes any extended data that 3DSpace might have added. For more information, see Operating Modes. |
#### physical tables
table NAME {
COLUMN_NAME DATATYPE [primary];
...
vault STRING;
} | Defines all of the legacy system's tables and the columns. The [primary] keyword indicates the column used as the object identifier for the table and should be a name or integer column. If the table uses more than one column to generate the unique identifier, do not use the he [primary] keyword on any column.For more information, see Physical Table Descriptions. |
Optional statement used in the table definition: vault TABLE(COLUMN); |
Indicates to load the objects into specific vaults on a per object basis, based on metadata (a column in a table) in the adapted data source. You might need to add the column to the table description in the mapping file before you can reference it in the type’s description. For more information, see About Local Vaults. |
table VIRTUALTABLENAME {
join TABLE,TABLE,TABLE...
where EXPRESSION
} | Defines virtual tables (tables that do not exist in the physical data source but might need to be described when there are associations between tables). The join statement lists the tables to be joined. The where EXPRESSION keyword uses Oracle or SQL expressions to describe the association between tables. For more information, see Joined Tables. |
#### ENOVIA types
type TABLE(COLUMN) [using TABLE(COLUMN)] [alias name] {
id TABLE(COLUMN);
name TABLE(COLUMN) [using TABLE(COLUMN)];
lockbus TRUE|FALSE;
policy TABLE(COLUMN) [using TABLE(COLUMN)];
owner TABLE(COLUMN) [using TABLE(COLUMN)];
default policy POLICY_NAME;
default owner USERNAME;
next EXPRESSION;
revision TABLE(COLUMN) [using TABLE(COLUMN)];
nextrev TABLE(COLUMN) [using TABLE(COLUMN)];
prevrev TABLE(COLUMN) [using TABLE(COLUMN)];
description TABLE(COLUMN) [using TABLE(COLUMN)];
icon TABLE(COLUMN) [using TABLE(COLUMN)];
locker TABLE(COLUMN) [using TABLE(COLUMN)];
created TABLE(COLUMN) [using TABLE(COLUMN)];
modified TABLE(COLUMN) [using TABLE(COLUMN)];
state TABLE(COLUMN) [using TABLE(COLUMN)];
attribute ATT_NAME TABLE(COLUMN) [using TABLE(COLUMN)];
} | Defines the admin types. When only a COLUMN is specified, the previously stated TABLE is assumed. The using clause syntax is not allowed when running the SQL Loader (for more information, see Specifying Data from Multiple Tables. As a workaround, see
Joined Tables. Object uniqueness (type/name/rev) is enforced at the schema level. Depending on the legacy system implementation and this definition, it could be possible to create objects with duplicate type/name/revisions. You must either eliminate this possibility (by ensuring the foreign schema enforces unique type/name/rev), or accommodate duplicate type/name/rev in any application code that accesses the adaplet vault.
Columns in a foreign table that correspond to Type, Name, and Revision must be managed to support the 3DSpace assumption of Type/Name/Revision uniqueness within a vault. Failing to do so can result in inconsistent behavior because it is indeterminate which of the multiple objects will be returned for a given Type/Name/Revision.
For example: type Department {
id DEPT(DEPTNO);
next "max(DEPTNO)+10";
name DNAME;
attribute "Department Number" DEPTNO;
attribute Location LOC;
default policy Departments;
default owner scott;
} |
Optional statement used in the type definition:derive TYPENAME;
type TABLE(COLUMN) alias NAME; | Defines a type hierarchy.
The type hierarchy in the adaplet is independent of the type hierarchy in 3DSpace. The leaf types in the adaplet must match the leaf types in 3DSpace, but the parent types are independent. The adaplet type hierarchy should reflect the data structure in the foreign database and should be no more than two levels deep. In general, you will have one parent type per table. Each parent type will have no more than one level of child types.
The type TABLE(COLUMN) alias NAME statement indicates how the type is specified in the column, and how it should be used in 3DSpace. For example:
type Clerk {
derive Employee;
type JOB alias "CLERK";
}
For more information, see Oracle Sample Table Structures. The EMP table uses the JOB column to define the subtype for that row. Specify each different entry in this column as a type in the mapping file, and create the Types in 3DSpace. |
Required statement used in the type definition: id TABLE(COLUMN); | Defines the unique identifier for the type.
For more information, see Unique Identifiers for Types. |
Required statement used in the type definition: name TABLE(COLUMN) [using TABLE(COLUMN)]; | A column in a table in the foreign database must correlate to the names of the business objects that will be displayed in 3DSpace. This statement indicates that each row in the specified table will be an object of the type you are defining, using the name in the indicated column. For example:
name ENAME;
The Employee
type objects get their names from the ENAME column. When the table containing the ID is provided, TABLE defaults to that table. As a result, ENAME is a column in the table named above in the ID statement, EMP.
Once the table containing the ID is provided, this TABLE can be defaulted.
|
Required statement used in the type definition: policy TABLE(COLUMN) [using TABLE(COLUMN)]
or default policy POLICY_NAME; | Because business object instances require a policy, a policy must be specified using the policy or default policy statement. If data exists that can be used for policy names, it can be mapped with the policy TABLE (COLUMN) statement. If policies are defined in this manner, all of the policies in the table must be created using MQL. |
Required statement used in the type definition: owner TABLE(COLUMN) [using TABLE(COLUMN)] or default owner USERNAME; | Because business object instances require an owner, an owner must be specified using the owner or default owner statement. If data exists that can be used for owner names, it can be mapped with the owner TABLE (COLUMN) statement. If owners are defined in this manner, all of the persons in the table must be created using MQL. |
Optional statement used in the type definition: lockbus TRUE|FALSE; | Use when the connection to your adaplet vault is not readonly. Even if the mode statement specifies extend or readwrite , the foreign database could be readonly.
The default is false. If set to true, the SQL for the initial lookup when modifying a foreign business object selects the row with the additional specification “for update.” When set to false, the data could be updated by a concurrent session at the same time.
Do not use true if the connection to your adaplet vault is readonly, even if the mode of the adaplet is extend or readwrite .
|
Optional statement used in the type definition: next EXPRESSION; | Specifies an expression used to calculate the ID for the next object that is created of this type. It only applies when the adaplet is capable of creating objects, revisions, or clones in the legacy system (readwrite or extend modes). For example:next "max(EMPNO)+1"; When used with an Oracle sequence, the adaplet sometimes appends the types table name to whatever is specified by the next statement. To avoid this, use the keyword from in the next value. For example:
next "SEQUENCE_NAME.nextval from DUAL";
The sequence must be enclosed in quotes. DUAL is a built-in table in Oracle that is commonly used for this purpose.
To set the next object ID to a unique object ID for an integer column (number(10) will suffice), use hashed as the value. The column must have a unique constraint. For example, this code enables hashed id generation for the ID column of the PART table that maps to the 3DSpace type “Part:
type Part {
id PART(ID) mapped;
next hashed;
type PART(TYPE) alias "Part"; |
Optional statements used in the type definition: nextrev TABLE (COLUMN) [using TABLE (COLUMN)]
prevrev TABLE (COLUMN) [using TABLE (COLUMN)]
| Supports mapping the next and previous object revisions, when a revision chain exists in the other database. For example:
prevrev "Revisions" PREVIOUS;
|
relationship RELATIONSHIPNAME {
id TABLE (COLUMN);
next EXPRESSION;
delete OPTION;
from TYPENAME in TABLE(COLUMN);
to TYPENAME in TABLE(COLUMN);
attribute ATTRIBUTE_NAME TABLE(COLUMN);
} | Defines relationships between objects. You can include descriptions, icons, and attribute in the definition of a relationship. The relationship refers to the primary columns or to columns whose combined value is the same as the object id at that end. In other words, the columns specified in the relationship id can only be the columns used for id columns in the type definitions for the types being connected. If a relationship has attributes, a relationship ID is required. The syntax for relationship IDs and attributes is identical to IDs and attributes on business types.
Using OIDs provides better performance than using Type/Name/Revision. Cardinality, allowed types, and other rules of relationships are enforced by 3DSpace and not the adaplet. |
Optional statement used in the relationship definition: delete OPTION; | Disconnects objects in a relationship, where OPTION can be one of these items:
nullfrom to null out the from column
nullto to null out the to column
remove to remove the row
For example:
relationship "DeptGrade" {
id DEPTGRADE(DEPTNO,GRADE) mapped;
delete remove;
from Department in DEPTGRADE(DEPTNO);
to "Salary Grade" in DEPTGRADE(GRADE);
}
The row that contains the relationship DEPTGRADE will be removed. |
ExportFieldDelimiter | Specifies an alternative field separator. By default the field separator is ‘|’. If any data has embedded ‘|’ characters, then an alternative character must be specified. A non-printable control character is suitable. The character is specified with the equivalent HEX code, for example:
item ExportFieldDelimiter 1C; |
ExportRecordDelimiter | Specifies an alternative record separator. By default the record separator is a carriage return. If any data has embedded carriage returns, then an alternative character must be specified. Another non-printable control character is suitable. The character is specified with the equivalent HEX code, for example.
Item ExportRecordDelimiter 1E; |
ExportDataDirectory | Specifies the directory where export data files should be written. The default is the current working directory. An existing directory with suitable storage space can be specified. |
ExportMaxObjects | Specifies the maximum number of objects to be written for a set of data files. By default all data is written to one set of data files. For very large data exports, it may be desirable to break up the data. In addition to creating smaller data files, it allows for concurrent exporting and loading. When specified the complete set of data files and load scripts will be written to subdirectories named 001, 002, 003, … |
ExportRowArraySize | Specifies the number of reads in 1 transaction. The default is 30. When doing exports and reading large number of records, it might be more efficient to set this to a larger number (100 or 1000) to significantly speed export time. However, it is more efficient for the database interaction, but at the expense of using more memory. |
ExportCreateHistory | Can be set to true to add a create history record for each business object. By default, no history is generated. |