Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

A new Data Days event is coming soon! This time we’re going bigger than ever. Fabric, Power BI, SQL, AI and more. Don't miss out.

Reply
SivaKishor289
Frequent Visitor

How to Connect Power BI to a View in H2 Database (Only JDBC Available)?

Hi Team,  @lbendlin , @v-lid-msft , @amitchandak , @Gilbert , @Greg_Deckler , @Mariusz , @MattAllington , @AlexisOlson , @RezaRad@MFelix

I’m working with client data that is stored in a VIEW within an H2 database. I’m able to view the data and query it using DBeaver, which connects via JDBC.

However, since Power BI does not support JDBC natively, I’m unable to connect Power BI directly to this H2 view.

My question is:
What is the best way to bring that view’s data into Power BI for reporting purposes?

Is there a workaround such as:

  • Using an ODBC-JDBC bridge or a custom connector?

  • Writing a script that extracts the view data via JDBC and pushes it into a format Power BI can consume?
    Note: I don’t have the H2 server installed locally — I'm connecting to it using DBeaver only.

Any guidance or suggestions on how to set this up efficiently — preferably with refresh options — would be really helpful.

Thanks in advance!

1 ACCEPTED SOLUTION
HarishKM
Memorable Member
Memorable Member

@SivaKishor289 Hey,

To bring data from an H2 database view into Power BI, you can consider the following options:

  1. I will also use ODBC-JDBC Bridge -

    Use an ODBC-JDBC bridge to create an ODBC connection that Power BI can access.

     

  2. Use of Custom Connector: Develop a custom Power BI connector using the M language, specifically tailored to work with JDBC data sources.

    • This requires coding within Power Query SDK and may involve complexities.
  3. Scripted Extraction and Transformation:

    • Write a Python or Java script to query the H2 view using JDBC.
    • Export the data to a CSV, Excel, or other formats that Power BI can import.
    • Automate the script to periodically refresh the data and update the Power BI report. - Integrating H2 with Python and Flask

These methods can enable the import and refreshing of your H2 data view into Power BI. Consider the refresh options and complexity suited to your setup and resources.

 

 

Thanks

Harish KM

If these steps help resolve your issue, your acknowledgment would be greatly appreciated.

View solution in original post

6 REPLIES 6
v-veshwara-msft
Community Support
Community Support

Hi @SivaKishor289 ,
Just following up on your query. If you need any further assistance, please reach out.
Thank you.

v-veshwara-msft
Community Support
Community Support

Hi @SivaKishor289 ,
We wanted to kindly follow up regarding your query. If you need any further assistance, please reach out.
Thank you.

v-veshwara-msft
Community Support
Community Support

Hi @SivaKishor289 ,
Just checking in to see if you query is resolved.
Could you please confirm if the solutions provided were helpful. If further assistance is needed, please reach out.
Thanks to @MFelix , @rohit1991 and @HarishKM for your valuable suggestions.

 

Thank you.

MFelix
Super User
Super User

Hi @SivaKishor289 ,

 

Have you tried using the ODBC connector to link to the H2.

 

https://www.h2database.com/html/advanced.html#odbc_driver

https://learn.microsoft.com/en-us/power-query/connect-using-generic-interfaces


Regards

Miguel Félix


Did I answer your question? Mark my post as a solution!

Proud to be a Super User!

Check out my blog: Power BI em Português





rohit1991
Super User
Super User

Hi @SivaKishor289 ,

Power BI doesn’t support JDBC natively, so you can’t connect directly to H2. But you’ve got a few solid workarounds that plenty of folks use in real-world projects:


1. Export to CSV/Excel and Connect Power BI to That Use DBeaver to export your H2 view as CSV or Excel. Store the exported file somewhere Power BI can access. OneDrive, SharePoint, or even a local folder if you're just testing. Set up Power BI to connect to that file and refresh as needed. If you want to automate updates, DBeaver can run export tasks on a schedule (CLI/Batch/Script).

 

2. Write a Script for Automated Extraction Python (with jaydebeapi and the H2 JDBC driver) is great for this. Write a script that queries the H2 view and outputs to CSV or even directly to a SQL database Power BI can read. You can schedule the script to refresh your export as often as you need.

 

3. Use an ODBC-JDBC Bridge There are tools (like Easysoft’s ODBC-JDBC Bridge) that create an ODBC connection from JDBC sources. This allows you to connect Power BI to the H2 database through ODBC. It does add a layer of complexity and sometimes licensing cost, but it works if you need more real-time access.

 

4. ETL to a Supported DatabaseIf your reporting needs grow, consider loading your H2 view data into a supported SQL database (like SQL Server, PostgreSQL, etc.) via a script or ETL tool, then connect Power BI directly.

 

For simple, one-off reporting or prototyping, exporting to CSV/Excel is the quickest. For repeatable, automated reporting, a Python or Java extraction script gives you the most flexibility. ODBC-JDBC bridges are best reserved for scenarios where you really need direct, automated refreshes and can justify the extra setup.

 


Did it work? ✔ Give a Kudo • Mark as Solution – help others too!
HarishKM
Memorable Member
Memorable Member

@SivaKishor289 Hey,

To bring data from an H2 database view into Power BI, you can consider the following options:

  1. I will also use ODBC-JDBC Bridge -

    Use an ODBC-JDBC bridge to create an ODBC connection that Power BI can access.

     

  2. Use of Custom Connector: Develop a custom Power BI connector using the M language, specifically tailored to work with JDBC data sources.

    • This requires coding within Power Query SDK and may involve complexities.
  3. Scripted Extraction and Transformation:

    • Write a Python or Java script to query the H2 view using JDBC.
    • Export the data to a CSV, Excel, or other formats that Power BI can import.
    • Automate the script to periodically refresh the data and update the Power BI report. - Integrating H2 with Python and Flask

These methods can enable the import and refreshing of your H2 data view into Power BI. Consider the refresh options and complexity suited to your setup and resources.

 

 

Thanks

Harish KM

If these steps help resolve your issue, your acknowledgment would be greatly appreciated.

Helpful resources

Announcements
May Power BI Update Carousel

Power BI Monthly Update - May 2026

Check out the May 2026 Power BI update to learn about new features.

Fabric SQL PBI Data Days

Data Days 2026 coming soon!

Sign up to receive a private message when registration opens and key events begin.

New to Fabric survey Carousel

New to Fabric Survey

If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.