# How to handle field mismatch

**URL:** <https://community.dremio.com/t/how-to-handle-field-mismatch/8860>\
**Category:** Dremio University\
**Created:** [March 10, 2022, 1:28pm UTC](https://community.dremio.com/t/how-to-handle-field-mismatch/8860 "2022-03-10T13:28:59Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![yehosef-tw](https://avatars.discourse-cdn.com/v4/letter/y/919ad9/32.png) [@yehosef-tw](https://community.dremio.com/u/yehosef-tw)\
**Post date:** [March 10, 2022, 1:28pm UTC](https://community.dremio.com/t/how-to-handle-field-mismatch/8860/1 "2022-03-10T13:28:59Z")

</div>

I’m working with JSON fields and it seem that one of the fields has a mapping conflict in some of the fields.

> Unable to coerce from the file’s data type “struct\<options::list\<struct\<name::varchar, value::varchar\>\>, handle::varchar, title::varchar, id::varchar, sku::varchar, image::varchar\>” to the column’s data type “varchar” in table “\<table\>”, column “line\_items.properties.value” and file “\<file\>”

The line\_items is an array of objects. I want to flatten the array and extract specific fields (sku, price, etc).

How do I work around this?

---

<div class="post-metadata">

**Author:** ![yehosef-tw](https://avatars.discourse-cdn.com/v4/letter/y/919ad9/32.png) [@yehosef-tw](https://community.dremio.com/u/yehosef-tw)\
**Post date:** [March 14, 2022, 10:10am UTC](https://community.dremio.com/t/how-to-handle-field-mismatch/8860/2 "2022-03-14T10:10:22Z")

</div>

_bump_ - any ideas/advice?

---

<div class="post-metadata">

**Author:** ![balaji.ramaswamy](https://sea2.discourse-cdn.com/flex020/user_avatar/community.dremio.com/balaji.ramaswamy/32/843_2.png) [@balaji.ramaswamy](https://community.dremio.com/u/balaji.ramaswamy)\
**Post date:** [March 25, 2022, 4:18am UTC](https://community.dremio.com/t/how-to-handle-field-mismatch/8860/3 "2022-03-25T04:18:55Z")

</div>

@yehosef-tw Sorry for the delay in response,

Is your file format PARQUET? it looks like you have heterogenous schema across files. Is that true?

---

<div class="post-metadata">

**Author:** ![yehosef-tw](https://avatars.discourse-cdn.com/v4/letter/y/919ad9/32.png) [@yehosef-tw](https://community.dremio.com/u/yehosef-tw)\
**Post date:** [April 11, 2022, 12:15pm UTC](https://community.dremio.com/t/how-to-handle-field-mismatch/8860/4 "2022-04-11T12:15:39Z")

</div>

Sorry for the delay - it’s raw json.

---

<div class="post-metadata">

**Author:** ![Arnie](https://avatars.discourse-cdn.com/v4/letter/a/ba9def/32.png) [@Arnie](https://community.dremio.com/u/Arnie)\
**Post date:** [June 10, 2024, 2:16pm UTC](https://community.dremio.com/t/how-to-handle-field-mismatch/8860/5 "2024-06-10T14:16:27Z")

</div>

I got same issue with JSON File - how to deal with it ?

error begins with : UNSUPPORTED\_OPERATION ERROR: Unable to coerce from the file’s data type "struct\<@…  
we are running 22.2.3 release

---

<div class="post-metadata">

**Author:** ![balaji.ramaswamy](https://sea2.discourse-cdn.com/flex020/user_avatar/community.dremio.com/balaji.ramaswamy/32/843_2.png) [@balaji.ramaswamy](https://community.dremio.com/u/balaji.ramaswamy)\
**Post date:** [June 13, 2024, 7:48am UTC](https://community.dremio.com/t/how-to-handle-field-mismatch/8860/6 "2024-06-13T07:48:11Z")

</div>

@Arnie Dremio stopped supporting mixed types since Dremio version 17. It looks like the JSON data has heterogenous data type, any chance you can confirm that is true?

---

<div class="post-metadata">

**Author:** ![Arnie](https://avatars.discourse-cdn.com/v4/letter/a/ba9def/32.png) [@Arnie](https://community.dremio.com/u/Arnie)\
**Post date:** [June 13, 2024, 8:28am UTC](https://community.dremio.com/t/how-to-handle-field-mismatch/8860/7 "2024-06-13T08:28:05Z")

</div>

Correct  
Would not it be possible to choose types or nodes to coerce ratier than rejecting the whole file ?  
Regards

---

<div class="post-metadata">

**Author:** ![balaji.ramaswamy](https://sea2.discourse-cdn.com/flex020/user_avatar/community.dremio.com/balaji.ramaswamy/32/843_2.png) [@balaji.ramaswamy](https://community.dremio.com/u/balaji.ramaswamy)\
**Post date:** [June 17, 2024, 7:05pm UTC](https://community.dremio.com/t/how-to-handle-field-mismatch/8860/8 "2024-06-17T19:05:31Z")

</div>

@Arnie, Dremio does coerce certain combinations but not all permutations/combinations.

---

<div class="post-metadata">

**Author:** ![Arnie](https://avatars.discourse-cdn.com/v4/letter/a/ba9def/32.png) [@Arnie](https://community.dremio.com/u/Arnie)\
**Post date:** [June 17, 2024, 7:51pm UTC](https://community.dremio.com/t/how-to-handle-field-mismatch/8860/9 "2024-06-17T19:51:22Z")

</div>

Thanks @balaji.ramaswamy. As I understand Dremio dors not plan to improve this feature or fix errors.
