Loading data into a SQL pool using PolyBase with T-SQL
PolyBase allows you to query external data in Hadoop, Azure Blob storage, or Azure Data Lake Storage from SQL Server using T-SQL. In this recipe, we'll import data from a CSV file in an Azure Data Lake Storage account into an Azure Synapse SQL pool using PolyBase.
Getting ready
Before you start, log in to Azure from PowerShell. To do this, execute the following command and follow the instructions to log in to Azure:
Connect-AzAccount
You need a Synapse SQL pool to perform the steps in the recipe. If you don't have an existing Synapse SQL pool, you can create one using the steps from the Provisioning and connecting to an Azure Synapse SQL pool using PowerShell recipe.
How to do it…
Follow the given steps to import data into Azure Synapse SQL using PolyBase:
- Execute the following command to create an Azure Data Lake Storage account and upload the data:
#Create a new Azure Data Lake Storage...