# Uploading nested csv giving error- 0: object mapping for \[comments\] tried to parse field \[comments\] as object, but found a concrete value

**URL:** <https://discuss.elastic.co/t/uploading-nested-csv-giving-error-0-object-mapping-for-comments-tried-to-parse-field-comments-as-object-but-found-a-concrete-value/278273>\
**Category:** Elasticsearch\
**Created:** [July 9, 2021, 10:50am UTC](https://discuss.elastic.co/t/uploading-nested-csv-giving-error-0-object-mapping-for-comments-tried-to-parse-field-comments-as-object-but-found-a-concrete-value/278273 "2021-07-09T10:50:51Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![anaya](https://avatars.discourse-cdn.com/v4/letter/a/48db29/32.png) [@anaya](https://discuss.elastic.co/u/anaya)\
**Post date:** [July 9, 2021, 10:50am UTC](https://discuss.elastic.co/t/uploading-nested-csv-giving-error-0-object-mapping-for-comments-tried-to-parse-field-comments-as-object-but-found-a-concrete-value/278273/1 "2021-07-09T10:50:51Z")

</div>

Hi! I am trying to upload some data to elastic through a csv file which has multiple fields, out of which one is a nested field.  
The mapping i defined is as follows-

"comments": {  
"type": "nested",  
"properties":{  
"name":{  
"type":"keyword"},  
"rating":{  
"type":"long"}  
}

And the csv looks like-

![image](https://us1.discourse-cdn.com/elastic/original/3X/d/e/de7968d72edfd0ff4d54c545d894fac35dc6841e.png)

The error I'm getting is-  
0: object mapping for [comments] tried to parse field [comments] as object, but found a concrete value

Am i using the wrong format somewhere? Fairly new to elastic, any help would be greatly appreciated

---

<div class="post-metadata">

**Author:** ![spinscale](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/spinscale/32/25011_2.png) [@spinscale](https://discuss.elastic.co/u/spinscale)\
**Post date:** [July 12, 2021, 8:39am UTC](https://discuss.elastic.co/t/uploading-nested-csv-giving-error-0-object-mapping-for-comments-tried-to-parse-field-comments-as-object-but-found-a-concrete-value/278273/2 "2021-07-12T08:39:08Z")

</div>

How do you try to upload this? Via the csv file import? My high level guess is, that your JSON is treated as a string and thus this is failing.

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [August 9, 2021, 8:39am UTC](https://discuss.elastic.co/t/uploading-nested-csv-giving-error-0-object-mapping-for-comments-tried-to-parse-field-comments-as-object-but-found-a-concrete-value/278273/3 "2021-08-09T08:39:38Z")

</div>

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
