Reputation: 526
Is there a way to output U-SQL results directly to a SQL DB such as Azure SQL DB? Couldn't find much about that.
Thanks!
Upvotes: 3
Views: 1169
Reputation: 14399
U-SQL only currently outputs to files or internal tables (ie tables within ADLA databases), but you have a couple of options. Azure SQL Database has recently gained the ability to load files from Azure Blob Storage using either BULK INSERT
or OPENROWSET
, so you could try that. This article shows the syntax and gives a reminder that:
Azure Blob storage containers with public blobs or public containers access permissions are not currently supported.
wasb://<BlobContainerName>@<StorageAccountName>.blob.core.windows.net/yourFolder/yourFile.txt
BULK INSERT
and OPENROWSET
with Azure Blob Storage is shown here:
You could also use Azure Data Factory (ADF). Its Copy Activity could load the data from Azure Data Lake Storage (ADLS) to an Azure SQL Database in two steps:
As a final option, if your data is likely to get into larger volumes (ie Terabytes (TB) then you could use Azure SQL Data Warehouse which supports Polybase. Polybase now supports both Azure Blob Storage and ADLS as a source.
Perhaps if you can tell us a bit more about your process we can refine which of these options is most suitable for you.
Upvotes: 7