# Elasticearch and Power BI

**URL:** https://discuss.elastic.co/t/elasticearch-and-power-bi/323250
**Category:** Elasticsearch
**Created:** [January 16, 2023, 12:35pm UTC](https://discuss.elastic.co/t/elasticearch-and-power-bi/323250 "2023-01-16T12:35:02Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![palko.balazs](https://avatars.discourse-cdn.com/v4/letter/p/e0b2c6/32.png) [@palko.balazs](https://discuss.elastic.co/u/palko.balazs)
#### Post date: [January 16, 2023, 12:35pm UTC](https://discuss.elastic.co/t/elasticearch-and-power-bi/323250/1 "2023-01-16T12:35:02Z")

</div>

Hi,

I'm trying to import our data stored in Elasticsearch into a BI Tool. I tried Power BI with ODBC using [this guide](https://www.elastic.co/guide/en/elasticsearch/reference/current/sql-client-apps-powerbi.html) and [this guide](https://www.elastic.co/downloads/tableau-connector) for Tableau.

I was able to get our data into both PowerBi and Tableau, however I'm struggling with nested documents.

All of the fields are imported into the BI tools correctly(include object like madeBy in my example) except those that are defined as nested type in the index mapping. The tools are not even listing contributions(which is our nested field).

As an alternative I've tried out [this](https://www.cdata.com/drivers/elasticsearch/powerbi/?kw=elasticsearch%20power%20bi&cpn=9936282406&utm_source=google&utm_medium=cpc&utm_campaign=Search_-_Connector_-_Elasticsearch&utm_content=Power_BI_-_Elasticsearch&utm_term=e%7Celasticsearch%20power%20bi&kw=elasticsearch%20power%20bi&cpn=9936282406&gclid=Cj0KCQiAiJSeBhCCARIsAHnAzT8aAEt-eINFXZzXTzEMdHjMSU1JZuJdckUCoNiulmL_W2m5Hm4Yf3kaAgkXEALw_wcB) Connector as well. By the looks of it it is also using ODBC. In case of this connector, the contributions field was showing up and it's value was a JSON Array text. I was able to tetect that as JSON and then expand on the items in that array. However the licensing fee is greater in this case. Are there any limitations to nested fields when it comes to getting data via ODBC?

Our simplified index mapping looks like the following:

```auto
{
  "index_patterns": [
    "volumesource*"
  ],
  "template": {
    "aliases": {
      "volumesources": {}
    },
    "mappings": {
      "properties": {
        "id": {
          "type": "keyword"
        },
        "externalId": {
          "type": "text"
        },
        "name": {
          "type": "keyword"
        },
        "value": {
          "type": "float"
        },
        "madeBy": {
          "properties": {
            "id": {
              "type": "keyword"
            },
            "externalId": {
              "type": "keyword"
            },
            "name": {
              "type": "text",
              "analyzer": "autocomplete",
              "search_analyzer": "standard"
            }
          }
        },
        "contributions": {
          "type": "nested",
          "properties": {
            "target": {
              "properties": {
                "id": {
                  "type": "keyword"
                },
                "externalId": {
                  "type": "keyword"
                },
                "name": {
                  "type": "keyword"
                }
              }
            },
            "type": {
              "type": "keyword"
            },
            "level": {
              "type": "integer"
            }
          }
        }
      }
    }
  }
}

```

---

<div class="post-metadata">

### Author: ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)
#### Post date: [February 13, 2023, 12:35pm UTC](https://discuss.elastic.co/t/elasticearch-and-power-bi/323250/2 "2023-02-13T12:35:26Z")

</div>

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
