I need to import a hierarchical codelist but receive this error message: 'Error importing data... row; column; wrong column name'. I am importing it as a zipped CSV.

Any help is appreciated, thanks!

asked 06 Mar, 20:14

hcardwell's gravatar image

hcardwell
111
accept rate: 0%


In order to import a codelist you should follow the naming that you gave to the different levels of your hierarchy.

If for instance you have a three-level hierarchy codelist with Category -> Subcategory -> Subdivision

alt text

The the CSV file should have at least 9 columns 1 with code, 1 with label, 1 with description (in case you only have one language set in your survey, i.e. English). You should import the codelist as a CSV rather than a ZIP.

category_code,category_label_en,category_description_en,subcategory_code,subcategory_label_en,subcategory_description_en,subdivision_code,subdivision_label_en,subdivision_description_en
1,1,,,,,,,
1,1,1 desc,1a,a,1a desc,,,
1,1,1 desc,1a,a,1a desc,1a1,1,1a1 desc
1,1,1 desc,1a,a,1a desc,1a2,2,1a2 desc
1,1,1 desc,1b,b,1b desc,,, 
1,1,1 desc,1b,b,1b desc,1b1,1,1b1 desc
1,1,1 desc,1b,b,1b desc,1b2
permanent link

answered 07 Mar, 17:24

Open%20Foris's gravatar image

Open Foris ♦♦
8735714
accept rate: 9%

edited 07 Mar, 17:25

Thanks, do you mean that I need to create and label each level within Collect under 'code lists' ? I have 11 columns, so I created 11 columns of the same name. However, I am still getting the same error message (row: 1, columns: name, Type: Wrong column name). I am importing as a CSV now.

(07 Mar, 21:27) hcardwell hcardwell's gravatar image

When you export the codelist what do you get? The codelist that you import should look the same than the one you export (I mean the structure)

Before you import anything you need to create the levels of the hierarchical codelist...

permanent link

answered 07 Mar, 21:55

Open%20Foris's gravatar image

Open Foris ♦♦
8735714
accept rate: 9%

I'm not sure what you mean. I can't import the codelist so there is nothing for me to export.

So, I have 11 columns and should create 11 columns within collect to correspond. For example, in the csv the attributes are labelled 'attribute_label', 'attribute_code', 'attribute_description'. Do the names for the levels need to look exactly the same?

(08 Mar, 18:43) hcardwell hcardwell's gravatar image

I understand what you mean now!

The order of the attributes that collect spits out is different from mine. For example, I have '_label', '_code', '_description' but collect shot out '_code', '_label_en', '_description_en'.

(08 Mar, 19:40) hcardwell hcardwell's gravatar image
Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Question tags:

×469

question asked: 06 Mar, 20:14

question was seen: 65 times

last updated: 08 Mar, 19:40