Dyota's blog

SQL Server Express LocabDB into Power BI

This is a continuation of the previous post describing how to clone a remote database to a local one.

The big benefit of doing this is that we can connect to this in Power BI. The connection is super fast because it doesn't have to drag all the data through the internet, and makes iteration time that much faster.

For this article, I am assuming that we are using the default instance, MSSQLLocalDB.

Connection server

The most reliable way of connecting to the local database is by specifying the instance pipe name.

Get this by running this command:

sqllocaldb info mssqllocaldb

Power BI connection

The data connection is a SQL server database.

When connecting in Power BI, on authentication, choose Windows authentication: Use my current credentials.

The Power Query looks like this:

Sql.Databases("np:\\.\pipe\LOCALDB#D2AA0AA9\tsql\query")

#database #powerbi #sql