# Canvas joining data from two different index/data view into one to show in dropdown

**URL:** <https://discuss.elastic.co/t/canvas-joining-data-from-two-different-index-data-view-into-one-to-show-in-dropdown/367171>\
**Category:** Elasticsearch\
**Created:** [September 26, 2024, 9:32am UTC](https://discuss.elastic.co/t/canvas-joining-data-from-two-different-index-data-view-into-one-to-show-in-dropdown/367171 "2024-09-26T09:32:20Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![aman\_kumar4](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/aman_kumar4/32/137605_2.png) [@aman\_kumar4](https://discuss.elastic.co/u/aman_kumar4)\
**Post date:** [September 26, 2024, 9:32am UTC](https://discuss.elastic.co/t/canvas-joining-data-from-two-different-index-data-view-into-one-to-show-in-dropdown/367171/1 "2024-09-26T09:32:20Z")

</div>

I want to join fields from two indexes/data views into one to show them in canvas dropdown, or want essql version of below sql code

SELECT "client\_id" AS id

FROM "client\_data\*"

UNION

SELECT "identifient\_id" AS id

FROM "id\_data\*"

---

<div class="post-metadata">

**Author:** ![Alex\_Salgado-Elastic](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/alex_salgado-elastic/32/103081_2.png) [@Alex\_Salgado-Elastic](https://discuss.elastic.co/u/Alex_Salgado-Elastic)\
**Post date:** [September 26, 2024, 12:50pm UTC](https://discuss.elastic.co/t/canvas-joining-data-from-two-different-index-data-view-into-one-to-show-in-dropdown/367171/2 "2024-09-26T12:50:01Z")

</div>

Hi @aman_kumar4 ,

ES|QL doesn't have a specific UNION command, so I asked internally, and they suggested trying something roughly like this:

```auto

from client_data*,id_data* | eval id = case(client_id IS NULL, identifient_id, client_id) | drop identifient_id, client_id

```
