# Please tell the template for creating index of the following JSON data

**URL:** <https://discuss.elastic.co/t/please-tell-the-template-for-creating-index-of-the-following-json-data/183026>\
**Category:** Elasticsearch\
**Created:** [May 28, 2019, 8:53am UTC](https://discuss.elastic.co/t/please-tell-the-template-for-creating-index-of-the-following-json-data/183026 "2019-05-28T08:53:58Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![sana1](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/sana1/32/46439_2.png) [@sana1](https://discuss.elastic.co/u/sana1)\
**Post date:** [May 28, 2019, 8:53am UTC](https://discuss.elastic.co/t/please-tell-the-template-for-creating-index-of-the-following-json-data/183026/1 "2019-05-28T08:53:58Z")

</div>

I am getting the data from a server in the following form  
[["5666", "8888", "8888"], ["88888", "666", "777"]]  
when viewed as json they become

0:  
0: 5666  
1: 8888  
2: 8888  
1:  
0: 88888  
1: 666  
2: 777

I need to write a Template in Elasticsearch and which I wrote as which is successful

curl -XPUT "[http://localhost:9200/my\_index](http://localhost:9200/my_index)" -H 'Content-Type: application/json' -d'  
{  
"settings" : {  
"number\_of\_shards" : 1  
},  
"table" : {  
"type1" : {  
"properties" : {  
"column1" : { "type" : "text" },  
"column3" : { "type" : "text" },  
"column3" : { "type" : "text" }

```
        }
    }
}

```

}'

problem is when I write data using python it does not write it on the template.

return Response (json.dump(data))  
es.index(index='my\_index', doc\_type = 'table')

No luck in the index update ☹ Is my template incorrect or method of sending data to the template , Please correct me

---

<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:** [June 25, 2019, 8:54am UTC](https://discuss.elastic.co/t/please-tell-the-template-for-creating-index-of-the-following-json-data/183026/2 "2019-06-25T08:54:05Z")

</div>

Closed on June 25, 2019, 8:54am UTC

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