Importing CSV Files
Central Administration allows you to import large amounts of data from CSV files in order to expedite the process of adding and changing Templates and Template System Allowances. Custom Attribute Values are imported from the same CSV file that is used to import the Template or Allowance to which they pertain. See Defining Custom Attributes.
Parameters can be set to regulate the import procedure:
- Creation of new entities can be allowed or disallowed.
- Alteration of existing entities can be allowed or disallowed.
- Imports can be forecasted (run in "check only" mode).
The CSV file must be formatted such that it is compatible with Central Administration. The CSV file must contain proper column headings in row one of the file. The column headings for each entity are listed in CSV Formats. For example, *TEMPLATE data might look like the following in a spreadsheet.
To import a CSV file
- Run PPLIMPCSV command. The Import Data from CSV File panel appears.
- Enter the Path and Type of Data.
- In order to actually import the data, you must set 'Validate only' to *NO. Then, indicate your preference for the remaining parameters.
- Accept additions (ADD): Specifies whether the command is allowed to create new entities.
*NO Data contained in the text file that is not found in the Central Administration database will be skipped.
- *YES Data contained in the text file that is not found in the Central Administration database will be placed into a new entity and saved into the database.
- Accept changes (CHANGE): Specifies whether the command is allowed to change existing entities.
*NO Data contained in the text file that is already in the Central Administration database will be skipped.
- *YES Data contained in the text file that is already in the Central Administration database will be updated with the values from the CSV file.
Validate only (CHECKONLY): Specifies that the command will only validate the data as opposed to actually using the data to create or change entities.
- *NO The command will create or change entities as dictated by the data.
- *YES The command will only validate the creation or alteration of entities as dictated by the data. No changes will be made to the database. The output spooled file will indicate that an entity was changed or created, but this should be interpreted as "would be" changed or created had the command been run with CHECKONLY(*NO) specified.
Truncate long values (TRUNCATE): Specifies whether any data encountered that exceeds the maximum allowed length of a column will be truncated to fit.
- *NO Any data that exceeds the maximum allowed length will cause an error.
- *YES Any data encountered that exceeds the maximum allowed length of a column will be truncated to fit.
In the above example, *TEMPLATE data from the "positions.csv" file will be imported. New entries in the CSV file will be added as Templates. Existing Templates in Central Administration will not be changed, and long values will not be truncated.
- Accept additions (ADD): Specifies whether the command is allowed to create new entities.
- Press Enter to import the data.