# Dynamic Mapping Hive issue

**URL:** <https://discuss.elastic.co/t/dynamic-mapping-hive-issue/79638>\
**Category:** Elasticsearch\
**Tags:** es-hadoop\
**Created:** [March 22, 2017, 7:12pm UTC](https://discuss.elastic.co/t/dynamic-mapping-hive-issue/79638 "2017-03-22T19:12:37Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![sheikh](https://avatars.discourse-cdn.com/v4/letter/s/e0b2c6/32.png) [@sheikh](https://discuss.elastic.co/u/sheikh)\
**Post date:** [March 22, 2017, 7:12pm UTC](https://discuss.elastic.co/t/dynamic-mapping-hive-issue/79638/1 "2017-03-22T19:12:37Z")

</div>

Index in elasticsearch have dynamic feilds  
For example I have following mapping  
"Person\_ID": {  
"type": "string"  
},  
"First\_name": {  
"type": "string"  
},  
"last\_name": {  
"type": "string"  
}

Some documents have last\_name , Some documents doesn't have last name  
When I query from Hive last\_name is always returned as null for every document

Hive external table defination is  
CREATE EXTERNAL TABLE elasticsearch ( Person\_ID STRING, First\_name String , last\_name String)  
STORED BY 'org.elasticsearch.hadoop.hive.EsStorageHandler'  
TBLPROPERTIES('es.nodes' = '123.456.789.111', 'es.port' = '9200', 'es.resource' = 'person/data','es.query' = '?q=\*');

Any help will be appreciated

---

<div class="post-metadata">

**Author:** ![james.baiera](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/james.baiera/32/10209_2.png) [@james.baiera](https://discuss.elastic.co/u/james.baiera)\
**Post date:** [March 27, 2017, 3:48pm UTC](https://discuss.elastic.co/t/dynamic-mapping-hive-issue/79638/2 "2017-03-27T15:48:43Z")

</div>

Could you provide some trace level logging for the job workers over a limited dataset? This should highlight the actual responses the connector is getting from the framework, and help debug the issue.

---

<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:** [April 24, 2017, 3:48pm UTC](https://discuss.elastic.co/t/dynamic-mapping-hive-issue/79638/3 "2017-04-24T15:48:44Z")

</div>

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