# NullPointer exception when extracting records from JSON

**URL:** <https://community.dremio.com/t/nullpointer-exception-when-extracting-records-from-json/8545>\
**Category:** Uncategorized\
**Created:** [December 23, 2021, 11:03am UTC](https://community.dremio.com/t/nullpointer-exception-when-extracting-records-from-json/8545 "2021-12-23T11:03:24Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Greeengooo](https://sea2.discourse-cdn.com/flex020/user_avatar/community.dremio.com/greeengooo/32/3814_2.png) [@Greeengooo](https://community.dremio.com/u/Greeengooo)\
**Post date:** [December 23, 2021, 11:03am UTC](https://community.dremio.com/t/nullpointer-exception-when-extracting-records-from-json/8545/1 "2021-12-23T11:03:24Z")

</div>

Hi community!  
I have an external snowflake source with JSON column that is stored in varchar in Dremio. I have converted the column and saved the table as a virtual dataset. When I try to get the record from json struct I get the nullpointer exception  
Any thoughts on this?

![image](https://us1.discourse-cdn.com/flex020/uploads/dremio/original/2X/a/a4f5681393477019dd5b81077a9f401b8835836d.png)  
 ![image](https://us1.discourse-cdn.com/flex020/uploads/dremio/original/2X/8/83816a39e2abeb8341c23668bc0f58892ff08159.png)  
 ![image](https://us1.discourse-cdn.com/flex020/uploads/dremio/original/2X/5/56c27e90c487a0c6b17b644162e7184ac75107c3.png)

---

<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:** [January 3, 2022, 2:43am UTC](https://community.dremio.com/t/nullpointer-exception-when-extracting-records-from-json/8545/2 "2022-01-03T02:43:42Z")

</div>

@Greeengooo If you take one record as sample then save as a text under a CSV file, add it to Dremio, then do convert\_fromjson(’\<json\_string\>’), like example below, does it give an NPE, trying to narrow down if this is something specific to the Snowflake connector

`select convert_fromjson('[{"name":"edberg","rank":1},{"name":"becker","rank":2}]')`
