# Unable to "import" json file into ES2.1

**URL:** <https://discuss.elastic.co/t/unable-to-import-json-file-into-es2-1/35857>\
**Category:** Elasticsearch\
**Created:** [November 30, 2015, 3:15am UTC](https://discuss.elastic.co/t/unable-to-import-json-file-into-es2-1/35857 "2015-11-30T03:15:50Z")\
**Posts on this page:** 3\
**Page:** 2

<div class="post-metadata">

**Author:** ![oguchi](https://avatars.discourse-cdn.com/v4/letter/o/e95f7d/32.png) [@oguchi](https://discuss.elastic.co/u/oguchi)\
**Post date:** [December 6, 2015, 8:42am UTC](https://discuss.elastic.co/t/unable-to-import-json-file-into-es2-1/35857/22 "2015-12-06T08:42:31Z")

</div>

Re: your response:  
I wrote a blog post about it: [http://david.pilato.fr/blog/2015/06/01/indexing-twitter-with-logstash-and-elasticsearch/1](http://david.pilato.fr/blog/2015/06/01/indexing-twitter-with-logstash-and-elasticsearch/1)

This is the error I get:

C:\ES210\logstash-2.1.0\bin\>logstash -f dotscale.conf --configtest  
io/console not supported; tty will not be manipulated  
Error: Expected one of #, input, filter, output at line 24, column 1 (byte 582)  
after

This is my conf file content:

input {  
twitter {  
consumer\_key =\> "nnnnnnnnnnnn"  
consumer\_secret =\> "mmmmmmmmmmmmmmmm"  
oauth\_token =\> "ccccccccccccccccccccccccc"  
oauth\_token\_secret =\> "zzzzzzzzzzzzzz"  
keywords =\> ["dotscale"]  
full\_tweet =\> true  
}  
}  
filter {  
}  
output {  
stdout { codec =\> dots }  
elasticsearch {  
protocol =\> "http"  
hosts =\> "localhost"  
index =\> "twitter"  
document\_type =\> "tweet"  
template =\> "twitter\_template.json"  
template\_name =\> "twitter"  
}  
}  
{  
"template": "twitter",  
"order": 1,  
"settings": {  
"number\_of\_shards": 1  
},  
"mappings": {  
"tweet": {  
"\_all": {  
"enabled": false  
},  
"dynamic\_templates" : [ {  
"message\_field" : {  
"match" : "message",  
"match\_mapping\_type" : "string",  
"mapping" : {  
"type" : "string",  
"index" : "analyzed",  
"omit\_norms" : true  
}  
}  
}, {  
"string\_fields" : {  
"match" : "\*",  
"match\_mapping\_type" : "string",  
"mapping" : {  
"type" : "string", "index" :  
"analyzed", "omit\_norms" : true,   
"fields" : {  
"raw" : {"type": "string",  
"index" : "not\_analyzed", "ignore\_above" : 256}  
}  
}  
}  
} ],  
"properties": {  
"text": {  
"type": "string"  
},  
"coordinates": {  
"properties": {  
"coordinates": {  
"type": "geo\_point"  
},  
"type": {  
"type": "string"  
}  
}  
}  
}  
}  
}  
}

---

<div class="post-metadata">

**Author:** ![dadoonet](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dadoonet/32/137187_2.png) [@dadoonet](https://discuss.elastic.co/u/dadoonet)\
**Post date:** [December 6, 2015, 10:11am UTC](https://discuss.elastic.co/t/unable-to-import-json-file-into-es2-1/35857/23 "2015-12-06T10:11:36Z")

</div>

Remove the template at the end. It should go in its own file.

---

<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 5, 2017, 11:33pm UTC](https://discuss.elastic.co/t/unable-to-import-json-file-into-es2-1/35857/24 "2017-07-05T23:33:17Z")

</div>

Closed on July 5, 2017, 11:33pm UTC



[Previous page](https://discuss.elastic.co/t/unable-to-import-json-file-into-es2-1/35857.md?page=1)
