Information Virtualization from Azure Blob Storage in Azure SQL Database

Harsh Bakshi
2 min readSep 16, 2024

--

Drawback Assertion

In contrast to SQL server 2022 and Azure Synapse devoted pool, which helps Polybase performance to virtualize the exterior knowledge inside the corresponding database, one has to bodily load the info from the Azure Blob storage file inside the Azure SQL database.

So, is it potential to learn the Azure blob storage file instantly inside the Azure SQL database with out the necessity to bodily load the info?

Stipulations

  1. Azure Storage Account
  2. Azure SQL Database

Answer

Be aware. We’d be leveraging Azure SQL Database Exterior REST Endpoints Integration.

Log in to the Azure SQL database, the place we have to learn the Azure blob storage file and execute the queries within the sequence offered under.

a)
CREATE MASTER KEY ENCRYPTION BY PASSWORD = '<<>>'
b)
CREATE DATABASE SCOPED CREDENTIAL [<>]
WITH IDENTITY = 'SHARED ACCESS SIGNATURE',
SECRET = 'sv=<>'
Return code

One can now learn the contents of the file in Azure Blob storage by way of GET Blob REST Endpoint.

declare @response nvarchar(max);
declare @url nvarchar(max) = 'https://<>.blob.core.home windows.internet/<>/<>'
exec sp_invoke_external_rest_endpoint
@url = @url,
@headers=""Settle for":"utility/xml"",
@credential = [<>],
@technique = 'GET',
@response = @response output
choose solid(@response as xml);

Consequence

Test.json

Output

Output

Know extra about our firm at Skrots. Know extra about our providers at Skrots Providers, Additionally checkout all different blogs at Weblog at Skrots


Know more about our company at Skrots. Know more about our services at Skrots Services, Also checkout all other blogs at Blog at Skrots

Thanks, Harsh
Founder | CEO — Skrots

Learn more about our blog at Blog at Skrots. Checkout our list of services on Skrots. Give a look at our website design at Skrots . Checkout our LinkedIn Page at LinkedIn.com. Check out our original post at https://blog.skrots.com/data-virtualization-from-azure-blob-storage-in-azure-sql-database/?feed_id=7046&_unique_id=66e897e56df9f

--

--

No responses yet