# ODBC Driver Wildcard

**URL:** https://discuss.elastic.co/t/odbc-driver-wildcard/206183
**Category:** Elasticsearch
**Tags:** elastic-stack-sql
**Created:** [November 1, 2019, 3:00pm UTC](https://discuss.elastic.co/t/odbc-driver-wildcard/206183 "2019-11-01T15:00:21Z")
**Posts on this page:** 9
**Page:** 1

<div class="post-metadata">

### Author: ![beerygaz](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/beerygaz/32/53174_2.png) [@beerygaz](https://discuss.elastic.co/u/beerygaz)
#### Post date: [November 1, 2019, 3:00pm UTC](https://discuss.elastic.co/t/odbc-driver-wildcard/206183/1 "2019-11-01T15:00:22Z")

</div>

I'm trying to access elasticsearch data in PwoerBi using the ODBC driver. It seems I can't use a wild-card to consolidate my indexes.

For example I have filebeats-yyy.mm.dd indexes and I want to visualise data across filebeats-\* - instead I have to select each index individually and it creates discrete data sets in PowerBi.

---

<div class="post-metadata">

### Author: ![beerygaz](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/beerygaz/32/53174_2.png) [@beerygaz](https://discuss.elastic.co/u/beerygaz)
#### Post date: [November 7, 2019, 10:45am UTC](https://discuss.elastic.co/t/odbc-driver-wildcard/206183/2 "2019-11-07T10:45:53Z")

</div>

Poor form to bump your own post, but this is becoming a major stumbling block for or architecture. If we can't query across indexes using ODBC it's a major issue.

---

<div class="post-metadata">

### Author: ![bogdan.pintea](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/bogdan.pintea/32/45740_2.png) [@bogdan.pintea](https://discuss.elastic.co/u/bogdan.pintea)
#### Post date: [November 8, 2019, 4:41am UTC](https://discuss.elastic.co/t/odbc-driver-wildcard/206183/3 "2019-11-08T04:41:33Z")

</div>

Hi @beerygaz,  
What's the error you get? The driver simply pipes the SQL statement through as is in vast majority of the cases, so if it's properly formatted, it should just work.  
Nevertheless I will look further into it next week, just in case, but alternatively, wouldn't defining a pattern alias on those indices work for you?  
Regards,  
Bogdan.

---

<div class="post-metadata">

### Author: ![Christian\_Dahlqvist](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/christian_dahlqvist/32/4617_2.png) [@Christian\_Dahlqvist](https://discuss.elastic.co/u/Christian_Dahlqvist)
#### Post date: [November 8, 2019, 5:56am UTC](https://discuss.elastic.co/t/odbc-driver-wildcard/206183/4 "2019-11-08T05:56:38Z")

</div>

I have not used the ODBC driver, but recall seeing posts around the JDBC driver requiring [quotation marks around the index pattern](https://discuss.elastic.co/t/sql-query-not-executing/191301) to work. Might this apply to the ODBC driver as well? Exactly what does your query look like?

---

<div class="post-metadata">

### Author: ![beerygaz](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/beerygaz/32/53174_2.png) [@beerygaz](https://discuss.elastic.co/u/beerygaz)
#### Post date: [November 12, 2019, 5:42am UTC](https://discuss.elastic.co/t/odbc-driver-wildcard/206183/5 "2019-11-12T05:42:26Z")

</div>

That was the missing piece. A pattern alias was what I was missing.

However, when I create an pattern alias I get the following error:

 ![image](https://us1.discourse-cdn.com/elastic/original/3X/f/a/fa277b1d26ef8b95eaee637850b214b5e3465daf.png)

Before I go ahead and adjust this setting, are there any negative impacts it may have? I'm guessing it was set thus for a reason?

---

<div class="post-metadata">

### Author: ![beerygaz](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/beerygaz/32/53174_2.png) [@beerygaz](https://discuss.elastic.co/u/beerygaz)
#### Post date: [November 12, 2019, 5:43am UTC](https://discuss.elastic.co/t/odbc-driver-wildcard/206183/6 "2019-11-12T05:43:50Z")

</div>

I have also just read that I can't use the ODBC drivers for Power Bi Web/Online reports, only in the desktop version. So back to the drawing board to try and get a JSON Web service to work.

---

<div class="post-metadata">

### Author: ![bogdan.pintea](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/bogdan.pintea/32/45740_2.png) [@bogdan.pintea](https://discuss.elastic.co/u/bogdan.pintea)
#### Post date: [November 12, 2019, 9:07am UTC](https://discuss.elastic.co/t/odbc-driver-wildcard/206183/7 "2019-11-12T09:07:38Z")

</div>

The online documentation reads: `Doc-value fields are costly since they might incur a per-field per-document seek`, so I believe the setting could have a performance impact.  
If you wouldn't need all the 300+ fields, you could also perform a custom query with Power BI to only fetch those fields relevant for your report.

---

<div class="post-metadata">

### Author: ![bogdan.pintea](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/bogdan.pintea/32/45740_2.png) [@bogdan.pintea](https://discuss.elastic.co/u/bogdan.pintea)
#### Post date: [November 12, 2019, 9:13am UTC](https://discuss.elastic.co/t/odbc-driver-wildcard/206183/8 "2019-11-12T09:13:52Z")

</div>

> I have also just read that I can't use the ODBC drivers for Power Bi Web/Online reports, only in the desktop version.

The [Power BI Gateway](https://docs.microsoft.com/en-us/power-bi/service-gateway-onprem) might be of help in this case.  
We might look into a dedicated connector at some point, but currently these - using the Desktop version or potentially the Gateway - are the only options available.

---

<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: [December 10, 2019, 9:14am UTC](https://discuss.elastic.co/t/odbc-driver-wildcard/206183/9 "2019-12-10T09:14:07Z")

</div>

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