Creating data in CSV format

You can create data for loading into your database with the Data Load utility in a CSV formatted file. The easiest way to create this data is to download a sample CSV file to use as a starting point.

About this task

The following image displays an example of a CSV file that you can use to load catalog data; this example uploads a sales catalog:
Sample catalog CSV file snapshot
In the CSV file:
  • The first row contains the keyword that corresponds to the business object you are loading. This keyword is case-sensitive. For example, Catalog for catalogs, or CatalogEntry for catalog entries.
  • The second row contains the column headings for the object you are loading. For example, the object Identifier or ShortDescription.
    Important: These column headings are case-sensitive and must match the name that the column maps to within the business object mediator. If the business object configuration file for the object that you are loading includes a mapping for the column, the name must match the name within the configuration file mapping. The configuration file must then map the column to the business object mediator.
  • The remaining rows of the file include data values that correspond to the column headings that you include in the file.
Important: If you are loading data with a specific component-based mediator, your CSV file must contain only one type of business object. In other words, do not combine two different CSV files into one larger CSV file. Your CSV files can contain multiple objects for a particular business object type. For example, you can load many catalog entries in a single CSV file that uses the catalog entry mediator. If you specify that the Data Load utility is to use the table object based mediator, you can combine multiple types of business objects in a single file. For more information about the available component and table object based mediators, see

Procedure

  1. Download a sample CSV file to use as your starting point. Save the sample CSV file with a new name in a folder on your computer. If you are loading data for a business object type that does not have a sample, create an empty file to include your CSV formatted data.
    You can download a sample CSV file from a provided Data Load sample. For more information, see Samples: Data Load utility.
  2. Open the CSV file that you downloaded or created.
    Use a text editor or a spreadsheet editor that can save in UTF-8 format, such as Open Office Calc.
    Note:
    • Before you edit the CSV file, ensure that you review the following topic: General data load best practices for CSV input files.
    • CSV formatted data is highly flexible and prone to errors. Manually editing comma delineated data can lead to unintentional segmentation, or formatting errors which can cause your data to become not loadable or incorrect.
  3. Optional: Edit the first row in your file to specify a keyword that identifies the type of business object that you are loading. The keyword is optional for the Data Load utility, but you are recommended to include the keyword when one is applicable. By specifying a keyword, you can load the CSV file with the Data Load utility or provide the file to business users to edit and use with the Management Center Catalog Upload feature.
    When you are specifying a keyword, select one of the following keywords. These keywords are case-sensitive, so ensure that you type the keyword exactly as shown:
    • Attachment
    • AttachmentAsset
    • AttachmentAssetLanguage
    • AttachmentDescription
    • AttributeDictionaryAttributeAllowedValues
    • AttributeDictionaryAttributeAndAllowedValues
    • AttributeDictionaryAttributeFolderRelationship
    • Catalog
    • CatalogDescription
    • CatalogGroup
    • CatalogGroupAsset
    • CatalogGroupAssociation
    • CatalogGroupAttachment
    • CatalogGroupCalculationCode
    • CatalogGroupDescription
    • CatalogGroupRelationship
    • CatalogGroupSEO
    • CatalogEntry
    • CatalogEntryAsset
    • CatalogEntryAssociation
    • CatalogEntryATPInventory
    • CatalogEntryAttachment
    • CatalogEntryAttributeDictionaryAttributeRelationship
    • CatalogEntryCalculationCode
    • CatalogEntryComponent
    • CatalogEntryDescription
    • CatalogEntryDescriptiveAttributeAndValue
    • CatalogEntryDescriptionOverride
    • CatalogEntryDescriptionUpdate
    • CatalogEntryInventory
    • CatalogEntryOfferPrice
    • CatalogEntryParentCatalogGroupRelationship
    • CatalogEntryParentProductRelationship
    • CatalogEntrySEO
    • CatalogEntryUpdate
    • CatalogFilter
    • CatalogFilterCategory
    • CatalogFilterCatentry
    • CatalogFilterCondition
    • CatalogFilterConditionGroup
    • ListPriceList
    • MarketingActivity
    • MarketingCampaign
    • MarketingContent
    • MarketingContentAttachment
    • MarketingContentAttachmentDescription
    • MarketingContentDescription
    • MarketingContentImageMap
    • MarketingElement
    • MarketingElementNVP
    • MarketingSpot
    • MarketingSpotDefaultContent
    • MarketingSpotDefaultTitle
    • MemberGroup
    • MemberGroupCondition
    • MemberGroupDescription
    • Offer
    • ProductDefiningAttributeAndAllowedValues
    • SKUDefiningAttributeValue
  4. Optional: In the second row, edit the column headers that are for identifying the data for a business object. Add or remove any optional column headings to match the data values that you are loading.
    For more information about the columns that you can specify for any supported types of business objects, see the topics under the Data Load utility CSV column and XML element definitions topic. If you are creating a CSV file for a custom business object type, or loading multiple types of business objects, the column headings must match the column mappings in your business object configuration file.
  5. Delete the sample data in the third row and all subsequent rows of data in your copied sample CSV file.
  6. Starting with the third row, specify the values for your business objects in the mandatory and optional columns. Separate the value for each column with the appropriate delimiter characters.
    Notes:
    • Each column value must be separated with the expected token delimiter character. By default, this character is a comma ( , ).
    • If you are specifying a string that includes spaces or special characters as a column value, enclose the string in the configured token value delimiter character. This delimiter is used to indicate the beginning and the end of a string. The default tokenValueDelimiter character is the double quotation mark ("). As an example, the following string includes commas and white spaces and is enclosed in the tokenValueDelimeter:
      "Men's fashions for business, casual, and formal occasions"
    • To indicate the end of the record for an object and to begin a new object record, include the line, or record, delimiter character. By default, this delimiter character is the newline character. With this default configuration, the CSV data reader reads each line in the file as a separate object record. If you include data for a column or record across multiple lines in your file, you can encounter errors or issues with the load process or with your data. If you want data for a column to span multiple lines, enclose the data within the configured tokenValueDelimiter characters. If you want data for an entire record to span multiple lines you must configure a new record delimiter to identify the end of each record.
    For more information about the delimiter characters that you can use with the CSV data reader and to configure multiple-line records, see Configuring the CSV data reader.
  7. Save your CSV file.

Results

The CSV file is created in a suitable format for use with the Data Load utility. When you load the file, the keyword and the column headers are interpreted but are not loaded into the database.