Loading data into a SQL pool using the COPY INTO statement
The COPY INTO
statement provides a faster and easier way to bulk insert data from Azure storage. We can use one T-SQL COPY INTO
statement to ingest data instead of creating multiple database objects. At the time of writing this book, the COPY INTO
statement is in preview.
In this recipe, we'll use the COPY INTO
statement to load data into an Azure Synapse SQL pool.
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 a Synapse SQL pool from Azure Data Lake Storage Gen2:
-
...