# Are there something like SELECT IF EXISTS...Funktion in Dremio

**URL:** https://community.dremio.com/t/are-there-something-like-select-if-exists-funktion-in-dremio/222
**Category:** Uncategorized
**Created:** [August 24, 2017, 12:07pm UTC](https://community.dremio.com/t/are-there-something-like-select-if-exists-funktion-in-dremio/222 "2017-08-24T12:07:34Z")
**Posts on this page:** 1
**Showing post:** 3

<div class="post-metadata">

### Author: ![igreg](https://avatars.discourse-cdn.com/v4/letter/i/bcef8e/32.png) [@igreg](https://community.dremio.com/u/igreg)
#### Post date: [February 6, 2019, 12:50pm UTC](https://community.dremio.com/t/are-there-something-like-select-if-exists-funktion-in-dremio/222/3 "2019-02-06T12:50:25Z")

</div>

I’m trying to do the same and Dremio shows an error: “Unable to find the referenced field: [product.details.price].” Below is a related thread. Looks like COALESCE and CASE can check if a field is null but not that the field exists. Is there an IF Exists type function in dremio?

> [@Query to select an elasticsearch field which is not part of ES mapping](https://community.dremio.com/t/query-to-select-an-elasticsearch-field-which-is-not-part-of-es-mapping/2701):
>
> I’m querying an elasticsearch index and extracting a field from a JSON tructure (product.details.price) for which there is no corresponding elasticsearch mapping. i.e The field uses elasticsearch dynamic mapping. In addition this field value can also be null. Below is an example: In elasticsearch: { “\_index”: “myIndex”, “\_type”: “data”, “\_id”: “myIndex\_20180925141725\_5524\_1\_000000070”, “\_score”: 1.0, “\_source”: { “product”: { “details”: { “price”: null } } } } Dremio query: SELEC…

---

_[View the full topic](https://community.dremio.com/t/are-there-something-like-select-if-exists-funktion-in-dremio/222)._
