# Dremio JDBC Selecting Sources and Datasets

**URL:** <https://community.dremio.com/t/dremio-jdbc-selecting-sources-and-datasets/4892>\
**Category:** Uncategorized\
**Created:** [January 15, 2020, 9:54pm UTC](https://community.dremio.com/t/dremio-jdbc-selecting-sources-and-datasets/4892 "2020-01-15T21:54:35Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![rdavid48](https://avatars.discourse-cdn.com/v4/letter/r/d78d45/32.png) [@rdavid48](https://community.dremio.com/u/rdavid48)\
**Post date:** [January 15, 2020, 9:54pm UTC](https://community.dremio.com/t/dremio-jdbc-selecting-sources-and-datasets/4892/1 "2020-01-15T21:54:35Z")

</div>

I am building a driver for Metabase, which is a BI tool. This driver will connect to Dremio through the Dremio JDBC driver. I managed to get a successful connection to Dremio using the connection string below.  
jdbc:dremio:direct=52.123.456.789:31010

However, there does not appear to be a way to specify a Space or Source or Dataset in the connection string itself.  
Metabase is expecting a jdbc-compliant data source to be returned with the connection. But the Dremio jdbc driver does not return such an object.

Below I enter the Dremio connection info.

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

After a successful connection, I see the dashboard below.  
However, the dashboard is empty because no Space or Source or Dataset was ever selected. Otherwise, they would show up in the dashboard.  
 ![image](https://us1.discourse-cdn.com/flex020/uploads/dremio/original/2X/9/9f47079dea3532eceea05264a74afc0fcf1dd93a.png)

How then do I retrieve a list of available Spaces, Sources or Datasets that I can return with the Dremio connection?

---

<div class="post-metadata">

**Author:** ![laurent](https://sea2.discourse-cdn.com/flex020/user_avatar/community.dremio.com/laurent/32/16_2.png) [@laurent](https://community.dremio.com/u/laurent)\
**Post date:** [January 15, 2020, 11:47pm UTC](https://community.dremio.com/t/dremio-jdbc-selecting-sources-and-datasets/4892/2 "2020-01-15T23:47:55Z")

</div>

Dremio JDBC driver implements all basic JDBC interfaces and should be compliant enough to support most tools. [DataSource](https://docs.oracle.com/javase/8/docs/api/javax/sql/DataSource.html) is a JDBC extensions though, and the driver does not provide an implementation, but wrappers exist.

It is not possible to specify a dataset in the connection string because it’s the equivalent of a SQL table, and tables should be queried explicitly through [Statement](https://docs.oracle.com/javase/8/docs/api/java/sql/Statement.html) or [PreparedStatement](https://docs.oracle.com/javase/8/docs/api/java/sql/PreparedStatement.html).

You might want to reach to the Metabase community, maybe they already provide examples on how to write connectors for JDBC drivers.

---

<div class="post-metadata">

**Author:** ![rdavid48](https://avatars.discourse-cdn.com/v4/letter/r/d78d45/32.png) [@rdavid48](https://community.dremio.com/u/rdavid48)\
**Post date:** [January 22, 2020, 7:52pm UTC](https://community.dremio.com/t/dremio-jdbc-selecting-sources-and-datasets/4892/3 "2020-01-22T19:52:45Z")

</div>

Thanks for your response, @laurent
