Guide: Using Microsoft Data Tools on MacBook M1
Introduction
As MacBook M1 users, we frequently encounter challenges when trying to work with Microsoft's data tools. During my data analytics course, I ran into many issues working with SQL Server, Power BI, and Excel. In this article, I'll share the solutions I found and how to overcome these challenges.
Note: I'm aware that there are various solutions to these issues, but I'll focus on the easiest, most accessible, and most stable methods (which may include paid tools). And if you'd like to see how autonomous AI agents can handle customer conversations on WhatsApp, your website, and other channels, we at WhaleBiz would be happy to help.
If you have suggestions for improving and streamlining these processes, I'd love to hear them. I'm open to collaboration and recommendations as I'm a data analyst at the beginning of my journey.
Installing Parallels Desktop
To get started, we need to install Parallels Desktop on your MacBook M1. This software allows you to run Windows on a virtual machine.
- Download and install Parallels Desktop.
- Follow the installation instructions and set up a new virtual machine (VM) with Windows.
After installation, you should have a Windows environment running on your Mac.
Installing Docker and Running MS SQL Server
Docker allows us to run containers, which are lightweight virtual machines that can run applications.
-
Install Docker on your MacBook M1:
- Download Docker from the official website.
- Follow the installation instructions.
-
Download and run MS SQL Server in a Docker container:
- Pull the MS SQL Server image from Docker Hub:
docker pull mcr.microsoft.com/mssql/server - Run the container with your desired settings:
docker run -e 'ACCEPT_EULA=Y' -e 'SA_PASSWORD=YourPassword123' -p 1433:1433 --name sqlserver -d mcr.microsoft.com/mssql/server - Replace
YourPassword123with a strong password of your choice.
- Pull the MS SQL Server image from Docker Hub:
-
Connecting to MS SQL Server from the Windows virtual machine:
- Use SQL Server Management Studio (SSMS) or another SQL client. Install MS SQL Server
- Connect using your Mac's IP address and port 1433.
- Connect with the username
saand the password you set (e.g.,YourPassword123).
-
Running Docker commands from the Mac terminal:
- To start the container if it stopped:
docker start sqlserver - To stop the container:
docker stop sqlserver - To see running containers:
docker ps
- To start the container if it stopped:
Want to consult with us?
We can help you choose, build and deploy the perfect AI solution for your business. Leave your details and we'll get back to you.
Running Microsoft Power BI and Excel
To work with Power BI and Excel, we need to install them on the Windows virtual machine.
- Download and install Microsoft Power BI.
- Download and install Microsoft Excel.
After installation, you can use these tools seamlessly in your Windows environment.
Working with Python and Visual Studio Code
To work with Python and connect to MS SQL Server, we need to set up Visual Studio Code (VS Code) in the virtual machine.
-
Download and install Visual Studio Code.
-
Install the Python extension for VS Code.
-
Connecting to MS SQL Server using pandas:
import pandas as pd import pyodbc conn = pyodbc.connect( 'DRIVER={ODBC Driver 17 for SQL Server};' 'SERVER=your_server_name;' 'DATABASE=your_database_name;' 'UID=sa;' 'PWD=YourPassword123' ) query = "SELECT * FROM your_table" df = pd.read_sql(query, conn) print(df.head()) -
Resolve any connection issues by verifying that the driver and network settings are correct.
Summary and Tips
In this guide, we covered how to set up a MacBook M1 for working with Microsoft's data tools. We installed Parallels Desktop, Docker, and various Microsoft applications, and demonstrated how to connect Python to MS SQL Server.
Tips:
- Always keep your software updated to prevent compatibility issues.
- Use official documentation for troubleshooting and advanced settings.
- Join online communities and forums for additional support and advice.
By following these steps, you can work efficiently with Microsoft's tools on MacBook M1. Need more help? Contact us.
Frequently Asked Questions
Why do you need Parallels Desktop to run Microsoft data tools on a MacBook M1?
Tools like Power BI and Excel run in a Windows environment, and the MacBook M1 uses a different processor. Parallels Desktop lets you run a Windows virtual machine on the Mac, so you can install and use these tools smoothly inside a Windows environment.
How do you connect to MS SQL Server running in a Docker container from the Windows virtual machine?
Once you have pulled and run the MS SQL Server image in a Docker container on port 1433, connect using SQL Server Management Studio (SSMS) or another SQL client. Enter your Mac's IP address, port 1433, the username sa, and the password you set when running the container.
How do you manage the SQL Server container from the Mac terminal?
You can control the container directly from the Mac terminal using Docker commands. Use docker start sqlserver to start a stopped container, docker stop sqlserver to stop it, and docker ps to see the containers currently running.
What should you do if Python's connection to MS SQL Server through pandas fails?
The connection is made using pyodbc and pandas with the ODBC Driver 17 for SQL Server. If you run into a connection problem, make sure the driver is installed correctly and that your network settings are valid, including the server name, database name, and the login credentials you configured.

Michael Romm
Michael is the founder and CEO of WhaleBiz, leading business and marketing strategy. An expert in data (SQL, Python) and developing automation and AI solutions for businesses.