# Convert Varchar to json Array

**URL:** <https://community.dremio.com/t/convert-varchar-to-json-array/3736>\
**Category:** Uncategorized\
**Created:** [July 23, 2019, 2:04pm UTC](https://community.dremio.com/t/convert-varchar-to-json-array/3736 "2019-07-23T14:04:58Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![tonio](https://sea2.discourse-cdn.com/flex020/user_avatar/community.dremio.com/tonio/32/1680_2.png) [@tonio](https://community.dremio.com/u/tonio)\
**Post date:** [July 23, 2019, 2:04pm UTC](https://community.dremio.com/t/convert-varchar-to-json-array/3736/1 "2019-07-23T14:04:58Z")

</div>

Hi, the question is pretty simple.  
I’m querying a parquet PDS, which has a column that looks like this:

| column |
| --- |
| empty text |
| empty text |
| empty text |
| '[{ "isActive" : true, "partner" : { "$oid" : "928jf983jf9020" }, "Types" : [ 2.0, 5.0], ... },{...}]' |

It is a varchar, I want to convert it to a JSON array.

I’ve tried:

```SQL
select 
CONVERT_FROM(table.column,'JSON') as json_array 
from table

```

**error:**

> ```
> UnsupportedOperationException
> 
> ```

What are possible workarounds to this situation?

---

<div class="post-metadata">

**Author:** ![tonio](https://sea2.discourse-cdn.com/flex020/user_avatar/community.dremio.com/tonio/32/1680_2.png) [@tonio](https://community.dremio.com/u/tonio)\
**Post date:** [July 26, 2019, 7:02pm UTC](https://community.dremio.com/t/convert-varchar-to-json-array/3736/2 "2019-07-26T19:02:46Z")

</div>

There seems to be some kind of incompatibility with parquet’s text datatype and the JSON converter.  
I’ve tried the same thing with dremio’s native text datatype and a CSV PDS, it works fine.  
So, the workaround would be to convert the text datatype to dremio’s native (either by binary or whatever)  
and then convert it to JSON.

(Oh, and the JSON conversion also doesn’t work for VDS, because when querying a subquery, it cannot know the original SCHEMA).
