When you create an entity using a TSQ data connection (for fixed-length data files generated by Trillium) you have the option to use an existing schema file or to create a new Data Dictionary Language (DDL) schema file. DDLs support fixed-length and delimited files and describe the record layouts (attributes, data types, and positions) used for data that is passed into or out of Quality processes.
When you create a DDL schema, you add columns and modify record length until the record layout is configured properly. Use this procedure to create a schema file for a fixed-length file; delimited files can be loaded without a schema.
To create a DDL schema file
-
From the Create Entity Wizard: Connection Page, select a TSQ data connection and click Next.
-
From the Entity Selection page, select an entity file and click Next. The Select a schema window opens. (If the window does not open, click Schema... on the DDL Selection page.)
-
Do one of the following:
- To use an existing schema file, select the file and click OK to continue to the Load Parameters page. Go to Step 9 of Creating an Entity.
- To create a new schema file, click Create schema. The New Schema window opens.
-
Enter a file name. Do not add a file extension; .ddl is added automatically.
-
Click OK. The Create DDL for file: window opens with a preview of the file contents.
-
Enter a number in the Record Length field to modify the default length of the record. The sum of all column lengths equals the length of the record.
-
(Optional) Select Record Buffer in the Record Length drop-down list and enter a number to modify the number of records to show.
-
Click Update. You may need to extend or shorten the record length until the data displays properly in the columns you add in the next step.
Note:
You can use the markers placed for every ten characters to help determine the length of the data.
-
Add columns with headers by right-clicking in the data preview and selecting Add Column. The Add Column to DDL window opens. Use the following guidelines:
- By default, columns are added to the left of where you click in the preview window.
- You should be familiar with the data so that you can add meaningful column names.
Add column settings as follows:
Option |
Description |
Name
|
Name of the column that is displayed when the DDL is applied to the data.
|
Type
|
Column character data type. Default is ASCII CHARACTER.
|
Add to end
|
Select this check box if you want to add a column at the end.
|
Offset
|
The zero-based character position where the data begins. This number increases with each column you add, depending on the preceding column width. This is a read-only field. |
Length
|
Total length of the column in characters. The sum of all column lengths equals the length of the record. The default length for a new column is equal to the number of remaining characters in the record. |
-
Click OK. The column displays in the preview window. Long column names may display truncated, but all names are saved to the file.
-
To edit column settings, right-click in the column you want to edit and select Edit Column. The Edit DDL Column window opens. Edit the column settings as necessary, then click OK.
-
To delete a column, right-click in the column you want to delete and select Delete Column.
-
When you are satisfied with the settings, click Ok to close the Create DDL for file: window. The Select a schema window displays with the new schema is highlighted.
-
Click OK to close the window. Go to Step 9 of Creating an Entity to complete entity creation.