# Query works from REST but not from the UI

**URL:** <https://community.dremio.com/t/query-works-from-rest-but-not-from-the-ui/2656>\
**Category:** Uncategorized\
**Created:** [January 30, 2019, 4:21am UTC](https://community.dremio.com/t/query-works-from-rest-but-not-from-the-ui/2656 "2019-01-30T04:21:45Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![jhaynie](https://sea2.discourse-cdn.com/flex020/user_avatar/community.dremio.com/jhaynie/32/1131_2.png) [@jhaynie](https://community.dremio.com/u/jhaynie)\
**Post date:** [January 30, 2019, 4:21am UTC](https://community.dremio.com/t/query-works-from-rest-but-not-from-the-ui/2656/1 "2019-01-30T04:21:45Z")

</div>

We have a query that works fine from the REST API but the same query fails from the UI.

Attached is the profile that works OK:

[2e2f365a-52bd-4977-872b-420200fd0e2f.zip](https://us1.discourse-cdn.com/flex020/uploads/dremio/original/2X/d/d6c4146ffbbe7e60918b40a602ddc097d225c097.zip) (72.0 KB)

Attached is the profile that fails in the UI (same query):

[c6c970e3-eab8-44c7-8c12-5100f3fe56db.zip](https://us1.discourse-cdn.com/flex020/uploads/dremio/original/2X/5/5e58d3ee5ded6a5628f87371b37781bf7b898c95.zip) (225.3 KB)

This is running 3.1

---

<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 30, 2019, 5:06am UTC](https://community.dremio.com/t/query-works-from-rest-but-not-from-the-ui/2656/2 "2019-01-30T05:06:58Z")

</div>

Hi @jhaynie

Your query via failed due to lack of direct memory

```
  Query was cancelled because it exceeded the memory limits set by the administrator. Expected at least 8.61GB bytes, but only had 8.00GB available.

```

Could it be possible that when you were running the query via UI, there was some other bigger query or reflection refresh happening in the backend? You can click on jobs and check all job types like the screenshot below and confirm that

![image](https://us1.discourse-cdn.com/flex020/uploads/dremio/original/2X/2/20ece360ad214d5cc13a289e8fc87f1e698a5349.png)

---

<div class="post-metadata">

**Author:** ![jhaynie](https://sea2.discourse-cdn.com/flex020/user_avatar/community.dremio.com/jhaynie/32/1131_2.png) [@jhaynie](https://community.dremio.com/u/jhaynie)\
**Post date:** [January 30, 2019, 5:07am UTC](https://community.dremio.com/t/query-works-from-rest-but-not-from-the-ui/2656/3 "2019-01-30T05:07:26Z")

</div>

No, I ran them in insolation.

---

<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 30, 2019, 5:08am UTC](https://community.dremio.com/t/query-works-from-rest-but-not-from-the-ui/2656/4 "2019-01-30T05:08:55Z")

</div>

Can you try run instead of preview?

---

<div class="post-metadata">

**Author:** ![jhaynie](https://sea2.discourse-cdn.com/flex020/user_avatar/community.dremio.com/jhaynie/32/1131_2.png) [@jhaynie](https://community.dremio.com/u/jhaynie)\
**Post date:** [January 30, 2019, 5:10am UTC](https://community.dremio.com/t/query-works-from-rest-but-not-from-the-ui/2656/5 "2019-01-30T05:10:43Z")

</div>

run seems to work OK
