Working with table layouts
If a table layout automatically generated by Analytics provides everything you need, you can use it without modification. There may be occasions, however, when you need to edit the table layout.
You may also want to perform other operations involving table layouts, such as renaming, copying, importing, and exporting.
Edit a table layout
In some cases, you may need to edit the automatically created table layout, or create the table layout manually. You can add, remove, or modify fields or records in a table layout as necessary.
Why would I edit a table layout?
You may want to edit a table layout for any of the following reasons:
- Add or delete fields You want to add or delete data fields, computed fields, or data filters.
- Modify default field definitions You want to modify the Analytics-created field definitions to change the data type, the format of numeric or datetime fields, or other properties of individual fields.
- Define overlapping fields You want to define overlapping fields.
Overlapping fields share one or more byte positions in a record. For example, if the first six positions in a record are defined as a full date field, you could define the first two positions as a month field. The two fields are overlapping.
- Correct errors You want to correct errors identified after you defined the
table using the Data Definition Wizard.
For example, data may be incorrectly displayed, and you may need to modify the record length or the skip length.
- Create a table layout manually You selected the Define Flat Files Manually option
in the Options dialog box.
This option changes the default behavior of Analytics. After you select a flat file as a data source, and provide other basic information in the Data Definition Wizard, the Table Layout dialog box is displayed and you must define the record(s) and fields for the Analytics table manually.
Rename a table layout
You can rename a table layout. Renaming a table layout does not rename the associated data file. You cannot rename a table layout if the table is currently open.
Note
If you rename a table layout that is referenced in an Analytics script you must also update all references to the table in the script or the script will fail when it is run.

- If the table you want to rename is open, close it.
- In the Overview tab, right-click the table layout and select Rename.
- Type a new name for the table layout and press Enter.
Note
Table layout names are limited to 64 alphanumeric characters. The name can include the underscore character ( _ ), but no other special characters, or any spaces. The name cannot start with a number.
Copy a table layout
You can copy a table layout to associate an identical table layout with the same Analytics data file or data source, and then subsequently modify the copied table layout. Copying and modifying a table layout may be easier than creating a new table layout from scratch.
Having more than one table layout associated with the same data file or data source allows you to define fields differently for the same data, create different subsets of fields, create different computed fields, and so on, which can be useful when working with large tables that would be unwieldy if all field definitions were included in a single table layout.
Caution
Be careful when you have more than one table layout associated with the same Analytics data file. If you have Delete Data File with Table selected in the Options dialog box, deleting any of the table layouts also deletes the data file, which means the data is no longer available for the remaining table layouts.
Data files are deleted outright. They are not sent to the Windows Recycle Bin.

- In the Overview tab, right-click the table layout you want to copy and select Copy.
- Right-click a project folder and select Paste.
- If a message appears asking whether you want to copy
or share field definitions, click Copy unless
you have a specific reason for clicking Share.
Note
The message appears if Don’t Share Table Layouts is deselected in the Options dialog box. For more information, see Share a table layout.
The table layout is copied and given an incrementing numeric suffix – for example, “Table2”. You can rename the table layout if necessary.
Share a table layout
You can share a table layout to associate the same table layout with two or more Analytics data files. Generally, you should maintain a separate table layout for each data file. However, sharing a single table layout can save labor by allowing you to centrally manage a table layout for multiple data files.
For more information, see Don’t Share Table Layouts inTable options.
Note
Sharing a table layout is not the same as copying a table layout and sharing a data file.
- When you share a table layout, a single table layout is associated with two or more data files.
- When you share a data file, two or more table layouts are associated with a single data file.

- Ensure that Don’t Share Table Layouts is deselected in the Table tab in the Options dialog box (Tools > Options > Table).
- Do one of the following:
- Perform an Analytics operation such as extract
or sort that outputs results to a new data file with the same record
structure as the source table.
The results table and the source table now share the same table layout.
- Copy and paste a table layout and click Share in the confirmation dialog box that appears.
- Perform an Analytics operation such as extract
or sort that outputs results to a new data file with the same record
structure as the source table.
- If you copied a table layout, do the following:
- Right-click the new table layout and select Link to New Source Data.
- If the Select File Location dialog
box is displayed, select the location where the data file or data
source is located and click OK.
You can select Client for a local or network location, or Server and a server profile for a location on an Analytics server.
- In the Select File dialog box, locate and select the new data file or data source and click Open.
For more information, see Modifying data sources for Analytics tables.
- If you have finished creating shared table layouts, select Don’t Share Table Layouts in the Options dialog box to prevent inadvertently creating shared table layouts in subsequent operations.
Copy a table layout from another Analytics project
You can copy a table layout from one Analytics project to another, which allows you to reuse the table layout, and the field definitions it contains, rather than creating them from scratch. In addition to saving labor, reusing table layouts, or sharing them with other Analytics users, ensures consistency. You can copy a single table layout, or multiple table layouts simultaneously.
If a table layout specifies an association with a particular Analytics data file (.fil), and a data file of the same name exists in the folder containing the destination Analytics project, the copied table layout is automatically associated with the data file in the destination folder. If there is no data file with the same name in the destination folder, you need to link the copied table layout to a new data source.
Note
The copied table layout and the data file it is associated with must match – that is, the structure of the data in the data file must match the field definitions specified by the table layout.
Data structure refers to the data elements (fields) contained in a data file, the number and order of the fields, and the data type and length of the fields. If the table layout and the data file do not match, jumbled or missing data results.

- Open the project that will contain the copied table layout or table layouts.
- In the Overview tab of the Navigator,
right-click the Analytics project entry, or a project folder, and
select Copy from another Project > Table.
The Analytics project is the top-level folder in the treeview.
- In the Locate Project File dialog box, locate and select the Analytics project that you want to copy the table layout or layouts from and click Open.
- In the Import dialog box, complete
any of the following tasks to add one or more table layouts to the To project_name list:
- Double-click a table layout.
- Ctrl+click multiple table layouts and then click the right-arrow button.
- Click Add All to add all the table layouts.
You can remove table layouts from the To project_name list by double-clicking an individual table layout, by using Ctrl+click to select multiple table layouts and then clicking the left-arrow button, or by clicking Clear All.
- Click OK to copy the table layout
or layouts into the destination project.
If a table layout with the same name already exists in the project, the copied table layout is given an incrementing numeric suffix.
- If you need to link the copied table layout to a new data source, see Modifying data sources for Analytics tables.
Import a table layout
You can import a table layout that exists as a separate .layout file outside an Analytics project, which allows you to reuse the table layout, and the field definitions it contains, rather than creating them from scratch. In addition to saving labor, reusing table layouts, or sharing them with other Analytics users, ensures consistency. You can import only one table layout at a time.
If a table layout specifies an association with a particular Analytics data file (.fil), and a data file of the same name exists in the folder containing the project, the imported table layout is automatically associated with the data file in the folder. If there is no data file with the same name in the project folder, you need to link the imported table layout to a new data source.
Note
The imported table layout and the data file it is associated with must match – that is, the structure of the data in the data file must match the field definitions specified by the table layout.
Data structure refers to the data elements (fields) contained in a data file, the number and order of the fields, and the data type and length of the fields. If the table layout and the data file do not match, jumbled or missing data results.

- In the Overview tab of
the Navigator, right-click the Analytics project
entry, or a project folder, and select Import
Project Item > Table.
The Analytics project is the top-level folder in the treeview.
- In the Project dialog box, locate and select a table layout file (.layout) and click Open.
- Click OK in the confirmation dialog
box.
The table layout is imported into the project. If a table layout with the same name already exists in the project, the imported table layout is given an incrementing numeric suffix.
- If you need to link the imported table layout to a new data source, see Modifying data sources for Analytics tables.
Export a table layout
You can export a table layout as a separate .layout file saved outside the Analytics project. A table layout exported as a separate file can later be imported into any Analytics project, which allows you to reuse the table layout, and the field definitions it contains, rather than creating them from scratch. You can export only one table layout at a time.

- Right-click the table layout in the Overview tab of the Navigator and select Export Project Item.
- In the Save As dialog box, choose
a location to save the table layout, rename the table layout if
required, click Save, and click OK in
the confirmation dialog box.
The table layout is exported to the location you specified.
Note
Limit the table layout name to 64 alphanumeric characters, not including the .layout extension, to ensure that the name is not truncated when the table layout is imported back into Analytics.
The name can include the underscore character ( _ ), but do not use any other special characters, or any spaces, or start the name with a number. Special characters, spaces, and a leading number are all replaced by the underscore character when the table layout is imported.
Delete a table layout
You can delete a table layout associated with an Analytics data file or a data source whenever necessary. Deleting a table layout also deletes the associated views, and any associated indexes or table relations.
Caution
Be careful when deleting table layouts. If you have Delete Data File with Table selected in the Options dialog box, deleting a table layout also deletes the data file, which means the data is no longer available.
The Delete confirmation dialog box warns you if the associated data file will be deleted along with the table layout.
Data files are deleted outright. They are not sent to the Windows Recycle Bin.

- In the Overview tab, right-click the table layout you want to delete and select Delete.
- Click Delete in the confirmation dialog box.