Import CSV files - advanced settings

Manage your CSV import files in the advanced settings in Productsup.

What is a CSV file?

A CSV is a plain text file that contains a list of data, separated (delimited) by a comma. CSV files do not just have to use a comma as a delimiter: you can use here other symbols such as :;, or ~. Files where the columns are separated by a tab are called TSV files and can be treated in the same way as CSV files.

The following is an example of a typical CSV file:

id,title,price,size
1,"Red Shirt","20 EUR",Small
2,"Blue Shirt","25 EUR",Large

You can import your raw CSV files via URL or via a local upload.

Import your CSV file

CSV files are usually not as complex to import as JSON or XML files. In most cases, the autodetect will import your file as desired.

For non-standard cases, you may have to adapt some of the import settings.

What to do if you have a non-standard encoding

Each file is saved with a certain encoding, which gives information on how to import the characters of the file.

The most standard encoding for CSV files is UTF-8. Some other common encodings are:

  • UTF-16

  • UTF-32

  • ANSI

  • Windows-1251

  • Windows-1252

Should your file differ from the standard, you may need to add this information to the Platform. This way, you can ensure that all data is imported as expected.

You should navigate to content options and CSV settings under the advanced settings of your data source. Then, enter your encoding type into the encoding field. See Import a file from an HTTP/FTP link for more information.

encoding.png

What to do if your delimiter is not a comma

Should the delimiter of your file not be a comma, you may need to add this information to the Platform. This way, you can ensure that all data is imported as expected.

You should navigate to content options and CSV settings under the advanced settings of your data source. Then, enter your encoding type into the delimiter field.

What to do if you have a non-standard enclosure

Data in CSV files which is more than one word or one number should be enclosed. This ensures that any cases where the delimiter appears in the product data will not cause the data to be parsed incorrectly.

id,title,price,size,description
1,"Red Shirt","20 EUR",Small,"This is a great product, I tested it myself"

In the above example, our description contains a comma: This is a great product, I tested it myself. We enclose the description field with quotation marks to tell the Platform to treat the entire description as one field. If we forget enclosure, we could be importing our description into two fields: This is a great product and I tested it myself.

The standard method of the enclosure is a quotation mark (") on either side of the data. Should this not be the case, you may need to add this information in the platform.

You should navigate to content options and CSV settings under the advanced settings of your data source. Then, enter your encoding type into the enclosure field.

Tip

The enclosure is automatically removed and does not show up in your import data in the Platform.

Manage non-standard headers

Normally, a CSV file will have a header in the first line. This tells us the names of the columns for the file.

id,title,price,size
1,"Red Shirt","20 EUR",Small

The previous CSV example would create the following import data:

Table 4. CSV import data

Id

Title

Price

Size

1

Red Shirt

20 EUR

Small



To edit information relating to the header, you should navigate to content options and CSV settings under the advanced settings of your data source.

header.png

What to do if your header is not in the first row

You should input the row in which your header is in, using the header in the row field to do so.

Add a missing header

If you are missing a header, you can add one in using the prepend header row.

Rename the columns in your header

If you want to directly rename your columns for the imported data, you can provide a new header by using the replace header row field.