Constructing a heading line in CSV-formatted files

Every CSV-formatted file that you import into PolicyCenter must have a heading line. The heading line initializes the import for a particular entity object in the data model. A heading consists of comma-separated fields. The first three fields must be, in order:

  • type
  • data-set
  • entityid

All subsequent fields must refer to columns, typelists, foreign keys, and joinarrays on the entity.

For example, a file importing into the Address entity has a heading that appears as:
  • type,data-set,entityid,addresstype,addressline1,createuser

The following fields follow the three required fields (type, data-set, and entityid):

  • addresstype – Represents a typelist
  • addressline1 – Represents a column

You do not have to specify all fields in the entity within the import file. You must specify at least the required fields. You can determine which fields PolicyCenter requires by viewing the entity description in the Data Dictionary.

Use lowercase to specify fields, including arrays. In this example, specify AddressLine1 in the data model as addressline1 in the import file.

To specify a foreign key, use the foreign key name without the concluding ID. In this example of a Person import:

1: type,data-set,entityid,firstname,lastname,primaryaddress,workphone,primaryphone,
      taxid,vendortype,specialtytype
2: Person,0,demo_sample:1,Ray,Newton,demo_sample:4000,818-446-1206,work,,,
3: Person,0,demo_sample:2,Stan,Newton,demo_sample:4002,818-446-1206,work,,,
4: Person,0,demo_sample:3,Harry,Shapiro,demo_sample:1004,818-252-2546,work,,,
5: Person,0,demo_sample:4,Bo,Simpson,demo_sample:1003,619-275-2346,work,,,
6: Person,0,demo_sample:5,Jane,Collins,demo_sample:4003,213-457-6378,work,,,
7: Person,0,demo_sample:6,John,Dempsey,demo_sample:1006,213-475-9465,work,,,

The primaryaddress field is a foreign key to the Address entity. It appears as PrimaryAddressID in the Data Dictionary but as primaryaddress in the import data.

If you specify a field in the heading that is not a recognizable column, typelist, foreign key or array, the import program silently ignores the column and any associated data. In the following example, the import ignores the %$zed heading field and the somedata value in line 3:

1: ADDRESS 
2: type,data-set,entityid,addresstype,addressline1,createuser, %$zed
3: Address,0,ab:1001,home,1253 Paloma Ave.,import_tools, somedata
4: Address,0,ab:1002,business,325 S. Lake Ave.,import_tools,