# From Hive to ES :EsHadoopException: Could not write all entries for bulk operation

**URL:** <https://discuss.elastic.co/t/from-hive-to-es-could-not-write-all-entries-for-bulk-operation/169554>\
**Category:** Elasticsearch\
**Created:** [February 22, 2019, 10:30am UTC](https://discuss.elastic.co/t/from-hive-to-es-could-not-write-all-entries-for-bulk-operation/169554 "2019-02-22T10:30:41Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![shivakumar\_kasha](https://avatars.discourse-cdn.com/v4/letter/s/e47c2d/32.png) [@shivakumar\_kasha](https://discuss.elastic.co/u/shivakumar_kasha)\
**Post date:** [February 22, 2019, 10:30am UTC](https://discuss.elastic.co/t/from-hive-to-es-could-not-write-all-entries-for-bulk-operation/169554/1 "2019-02-22T10:30:41Z")

</div>

Hi

we are trying to load data from hive to elasticsearch through es hadoop integration but we are facing some issues:  
The process which we followed is :

First create an index manually in elasticsearch through curl command:

curl -X PUT "ipaddress:9200/indexname" -H 'Content-Type: application/json' -d'  
{  
"mappings" :{  
"line" : {  
"properties" : {  
"Name" : {"type" : "text"},  
"Details " : {"type" : "text"},  
......

```
      }
    }
  } 

```

}  
'  
Next,we add the jar elasticsearch-hadoop-6.2.1.jar;

Create table in hive :

create external table tablename (Name string,Details string................)  
STORED BY 'org.elasticsearch.hadoop.hive.EsStorageHandler' TBLPROPERTIES ('es.resource' = 'indexname/line', 'es.index.auto.create' = 'false','es.nodes'='ipaddress:9200');

Table is created

Insert data:

insert overwrite table tablename select \*from tablename;

here we got an error:

org.elasticsearch.hadoop.EsHadoopException: Could not write all entries for bulk operation [1000/1000]. Error sample (first [5] error messages):  
failed to parse  
failed to parse  
failed to parse  
failed to parse  
failed to parse  
Bailing out...

What is the solution for this?  
Any advice will be appreciated.........

---

<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:** [March 22, 2019, 10:30am UTC](https://discuss.elastic.co/t/from-hive-to-es-could-not-write-all-entries-for-bulk-operation/169554/2 "2019-03-22T10:30:43Z")

</div>

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