Create an Azure SQL metadata target
Follow these steps to create an Azure SQL target reference to migrate metadata to with LiveData Migrator. Before you start, ensure that you have the following prerequisites:
- An Azure SQL Database in your Azure resource group. This must be initialized for Hive metadata.
- An ADLS Gen2 Storage account and container.
- Network connectivity from your LiveData Migrator host to the Azure SQL database server. See the network guide for more information.
To allow your LiveData Migrator host to connect to the Azure SQL database server, you must create a firewall rule for your LiveData Migrator host's public IP address on the Azure SQL server.
Run the following command on your host to display the public IP address:
curl ifconfig.me
For more information on Azure SQL firewall configuration, see Azure SQL Database and Azure Synapse IP firewall rules.
Create a metadata target using access key authentication
- Create an Azure SQL target with the Azure Portal
- Create an Azure SQL target with the CLI
The use of the quotation mark character is not supported when included in the SQL Password. See the Known issue for more information.
- In the Azure Portal, navigate to the LiveData Migrator resource page.
- From the LiveData Migrator menu on the left, select Metadata Targets.
- Select Create.
- Complete the details under the Basics section:
- Name: the name of the metadata target as you want it to appear in your list of resources.
- SQL Server: the SQL server containing the database to store metadata in.
- Database: the database to store metadata in.note
Hive Migrator doesn’t support Azure SQL database names containing blank spaces (
-
), semicolons (;
), open curly braces ({
) or close curly braces (}
). Additionaly, see Microsoft's documentation for a list special characters which can't be used. - SQL Username: the username to log in to the database with.
- SQL Password: the password to log in to the database with.
- HDI version: the version of HDInsight to use with the metadata target.
- Under Filesystem Details, use the Data Target dropdown to set the default filesystem for the metadata target.
- Select Review and create.
- Select Create.
If you encounter problems creating an Azure SQL target, see the troubleshooting guide.
See Update authentication settings for information on updating your authentication settings with the UI.
Run the following command to set up an Azure SQL database as a target:
az livedata migrator metadata-target azure-sql create --resource-group <resource_group> --metadata-target-name <target_name> --sql-server <resource_id> --sql-database <database_name> --sql-user <database_username> --sql-password <database_password> --migrator-name <migrator_name> --hdi-version <hdi_version> --data-target <target-storage-name>
See the Azure CLI LiveData Extension - Azure SQL Metadata Migration Target page for help with these parameters
See Update authentication for information on updating your authentication settings with the CLI.
Next steps
Following the creation of a metadata target, you can migrate metadata.