Power BI - How to Import SQLite Data in Power BI Desktop

in Proof of Brain2 years ago

In this post, we look at How to Import SQLite Data in Power BI Desktop. Previously I have covered how to import JSON data into Power BI. I have also explained how to connect with variety of the data connection sources like this with the Power BI. You may also find some of the variety of such tutorials I covered so check my profile and YouTube channel for this.

Make sure to download the Power BI desktop on your Windows. Also make sure to connect with the cloud account.So that any visualization you do can be then hosted on the online account. And you would be able to get the data connection in both places like this. So hopefully you would be in sync with me here for post.

So let's learn how to do just that.



Connect to Data Source - SQLite Data


There are plenty of sample databases you can try out for this tutorial. I am going to make use of the chinook database. Which was first came out for the mysql and then it was ported to many of the other database. You may want to check the chinook on github. You can have the link here.

odbc.png

This means you would be able to download the database in the .db format. You can see that you would be able to see it's table when you access through the command line. A lot of people do that and it works out for them pretty easily. So now let's move to making the connection.

Connect through Get data


If you want the visual representation of the process. You can take a look at it's video above and that would give you an idea on how to connect the database to the Power BI Desktop. Now you can take a look at the below image to see how you can get the data.

Here we need to setup the ODBC source. So your database file from the ODBC source can get connected through this method. So your first job is to open the ODBC datasource and create that to connect to the SQLite file. Download appropriate drivers if required.

So let's discuss the process.

  1. Open Power BI desktop.
  2. Login or without login get to the dashboard screen of the power bi.
  3. Make sure to click on "Get Data".
  4. Show the connect for data option in the Power bi.
  5. Find the "ODBC" option in the get data.
  6. Connect to that SQLite ODBC source.
  7. That's it. Now you have to open the data into the DAX editor.

Once you go through DAX editor and also the data is formatted. You are on your way for making the visualization. This would require you to get the data columns dropped onto the dashboard and then make the visualization out of the same. So it looks like a good option for you when you make use of the SQLite data like this.


I hope this tutorial helps you to get the connection to the SQlite data source or the file. Whichever method that you pick you would be able to get the SQlite data properly like this in that case. So hopefully this method to connect to the SQLite database through the ODBC driver helps your out.

Sort:  

Thanks for your contribution to the STEMsocial community. Feel free to join us on discord to get to know the rest of us!

Please consider delegating to the @stemsocial account (85% of the curation rewards are returned).

You may also include @stemsocial as a beneficiary of the rewards of this post to get a stronger support.