# Unable to load nested datatype using Logstash

**URL:** <https://discuss.elastic.co/t/unable-to-load-nested-datatype-using-logstash/89769>\
**Category:** Logstash\
**Created:** [June 16, 2017, 7:45pm UTC](https://discuss.elastic.co/t/unable-to-load-nested-datatype-using-logstash/89769 "2017-06-16T19:45:48Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Rory](https://avatars.discourse-cdn.com/v4/letter/r/a183cd/32.png) [@Rory](https://discuss.elastic.co/u/Rory)\
**Post date:** [June 16, 2017, 7:45pm UTC](https://discuss.elastic.co/t/unable-to-load-nested-datatype-using-logstash/89769/1 "2017-06-16T19:45:48Z")

</div>

I am trying to load data from SQL Server to ES. I have stored in a column in SQL, data in the following format:

`[{"addressid":1,"addressvalue":"123 abc st"},{"addressid":2,"addressvalue":"456 pqr st"}]`

The name of the column in SQL is addresses.

When I try to load data to ES using logstash jdbc plugin, I get the following error:

`"reason"=>"object mapping for [addresses] tried to parse field [addresses] as object, but found a concrete value"`

My ES Index mapping is as follows:

```
{
  "myindex": {
    "mappings": {
      "person": {
        "_all": {
          "enabled": false
        },
        "properties": {
          "addresses": {
            "type":"nested",
            "properties": {
              "addressid": {
                "type": "long"
              },
              "addressvalue": {
                "type": "keyword",
                "store": true,
                "ignore_above": 60
              }
            }
          },
          "state": {
            "type": "keyword",
            "store": true,
            "ignore_above": 2
          },
          "uid": {
            "type": "long"
          }
        }
      }
    }
  }
}

```

Am I doing something wrong?

Thanks.

---

<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:** [July 14, 2017, 7:50pm UTC](https://discuss.elastic.co/t/unable-to-load-nested-datatype-using-logstash/89769/2 "2017-07-14T19:50:42Z")

</div>

Closed on July 14, 2017, 7:50pm UTC

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