cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Community Tip - You can change your system assigned username to something more personal in your community settings. X

Is there any documentation for the CSVParser extension? (In particular - the Column Mapping parameter used on some of the services?)

sburton-3
3-Newcomer

Is there any documentation for the CSVParser extension? (In particular - the Column Mapping parameter used on some of the services?)

I was wondering if someone could either point me in the direction of some documentation for the CSVParser extension (I believe there was some on the old site).

I am trying to get the ReadCSV service to work - it seems to require the 'ColumnMapping' parameter in order to function, which is a STRING input, but nothing I try seems to actually make the service pick up any values (although it does read the header and seems to identify the correct number of rows in the CSV file - the entries all appear to be blank).

Any help would be appreciated !!!

ACCEPTED SOLUTION

Accepted Solutions

Column mappings are going to be a mapping between fields in your DataShape, defined within the parameters, to the fields in the CSV file. Each mapped column will be separated by a semi-colon. If you want to omit a field do not specify the DataShape field to map it to (see below). The field will still appear in the InfoTable but there will be no data. The columns in the CSV file must be represented by a DataShape field of the same baseType. When mapping a CSV field to a DataShape field, the order you specify the mapping must match the order the fields are, in the CSV file. For example: If your CSV file has 16 fields and you only want the first two,                 columnMappings: "dataShapeField1;;;;;;;;;;;;;;;dataShapeField16"

View solution in original post

4 REPLIES 4

Column mappings are going to be a mapping between fields in your DataShape, defined within the parameters, to the fields in the CSV file. Each mapped column will be separated by a semi-colon. If you want to omit a field do not specify the DataShape field to map it to (see below). The field will still appear in the InfoTable but there will be no data. The columns in the CSV file must be represented by a DataShape field of the same baseType. When mapping a CSV field to a DataShape field, the order you specify the mapping must match the order the fields are, in the CSV file. For example: If your CSV file has 16 fields and you only want the first two,                 columnMappings: "dataShapeField1;;;;;;;;;;;;;;;dataShapeField16"

Thanks for your help Meghan - I have got it to work now.

I also discovered that the last field on each line of the CSV file also has to have a terminating delimiter otherwise the extension will not recognize the last column of data.

Hi Shaun,

Could you please tell me how did you add a terminating delimiter to your csv, do you have an csv example screenshot?

Thanks.

reedsch
4-Participant
(To:mhollenbach)

p.s. This response, helpful as it is, does not quite pass the standard of 'documentation', per the eoriginal question.

Announcements


Top Tags