Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
Install Azure Data CLI (
Applies to:
Azure Data CLI (
azdata)
Note
Some scenarios previously handled by the Azure Data CLI (azdata) are now managed through Azure CLI (az) extensions and Azure Arc-based workflows. There is no single 1:1 replacement for all azdata commands. The following table highlights commonly related Azure CLI alternatives where they exist.
| azdata command area | Azure CLI extension / command group | Azure CLI reference |
|---|---|---|
azdata arc dc * |
az arcdata |
Azure Arc data CLI reference |
azdata arc sql mi * |
az arcdata sql mi |
Manage Azure SQL Managed Instance with CLI |
azdata arc postgres * |
az arcdata postgres |
Manage PostgreSQL server with CLI |
azdata migrate * |
az datamigration |
Migrate using CLI |
azdata extension * |
az extension * |
Azure CLI extensions overview |
azdata login |
az login |
az login |
azdata sql shell / azdata sql query |
No Azure CLI equivalent (use sqlcmd, SSMS, or other SQL tools) |
sqlcmd utility SQL Server Management Studio |
For new automation and management scenarios, prefer Azure CLI (az), Azure CLI extensions, and Azure Arc portal experiences.
For Linux distributions with apt there is a package for the azdata-cli. The CLI package has been tested on Linux versions which use apt:
- Ubuntu 16.04, Ubuntu 18.04, Ubuntu 20.04
Python/Pip installation
You can install Azure Data CLI (azdata) on Linux with yum, apt, or zypper, or on MacOS with Homebrew installation package managers. Before these package managers were available, installation required Python and pip.
Important
Before you proceed, you need to remove any installation of azdata that were installed to the global system Python. The new installers or native-packages add azdata to your path and it is impossible to know which one is first.
If you have an existing azdata installed to the global system Python, remove it before proceeding.
To view your current installation, run the following command:
$ pip list --format columns
If azdata is installed by pip it returns the package and version. For example:
Package Version
------------------- ----------
azdata-cli 15.0.X
azdata-cli-app 15.0.X
azdata-cli-cluster 15.0.X
azdata-cli-core 15.0.X
azdata-cli-hdfs 15.0.X
azdata-cli-notebook 15.0.X
azdata-cli-profile 15.0.X
azdata-cli-spark 15.0.X
azdata-cli-sql 15.0.X
The following example removes a pip installation of azdata.
$ pip freeze | grep azdata-* | xargs pip uninstall -y
After you have verified that you have removed any installation of azdata that was installed with pip, proceed with your installation.
Install with apt
Important
The Debian package of azdata-cli depends on the python3 package. On your system, this may be a Python version which predates the requirement of Python 3.6.x. If this poses an issue for you, find a replacement python3 package.
Install dependencies necessary to install
azdata-cli.sudo apt-get update sudo apt-get install gnupg ca-certificates curl wget software-properties-common apt-transport-https lsb-release -yImport the Microsoft repository key.
curl https://packages.microsoft.com/keys/microsoft.asc | sudo tee /etc/apt/trusted.gpg.d/microsoft.ascCreate local repository information.
For Ubuntu 16.04 client run:
sudo add-apt-repository "$(wget -qO- https://packages.microsoft.com/config/ubuntu/16.04/prod.list)"For Ubuntu 18.04 client run:
sudo add-apt-repository "$(wget -qO- https://packages.microsoft.com/config/ubuntu/18.04/prod.list)"For Ubuntu 20.04 client run:
sudo add-apt-repository "$(wget -qO- https://packages.microsoft.com/config/ubuntu/20.04/prod.list)"Install
azdata-cli.sudo apt-get update sudo apt-get install -y azdata-cli
Verify install
azdata
azdata --version
Update
Update the azdata-cli with the apt-get update and apt-get install commands.
sudo apt-get update && sudo apt-get install --only-upgrade -y azdata-cli
Uninstall
Remove the package from your system.
sudo apt-get remove -y azdata-cliRemove the repository information if you do not plan to reinstall
azdata-cli.sudo rm /etc/apt/sources.list.d/azdata-cli.listRemove the repository key.
sudo rm /etc/apt/trusted.gpg.d/dpgswdist.v1.asc.gpgRemove dependencies no longer required.
sudo apt autoremove
Next steps
For more information about big data clusters, see What are SQL Server 2019 Big Data Clusters?.