File 'https://gen2storeaccount.blob.core.windows.net/coldcontainer/833cae0e-634c-4bd0-acce-13d8713ce490' cannot be opened because it does not exist or it is used by another process. Visit this article to learn more about this error
Suruli Rajan
20
Reputation points
File 'https://gen2storeaccount.blob.core.windows.net/coldcontainer/833cae0e-634c-4bd0-acce-13d8713ce490' cannot be opened because it does not exist or it is used by another process.
im using json file
CREATE DATABASE demodb;
USE demodb
GO
CREATE MASTER KEY ENCRYPTION BY PASSWORD = 'welcome@123'
CREATE DATABASE SCOPED CREDENTIAL suruli001
WITH IDENTITY='SHARED ACCESS SIGNATURE',
SECRET = '';
GO
CREATE EXTERNAL DATA SOURCE demodatasource
WITH (
-- Please note the abfss endpoint when your account has secure transfer enabled
LOCATION = '',
CREDENTIAL = suruli001
);
CREATE EXTERNAL FILE FORMAT JSONfileformat
WITH
(
FORMAT_TYPE= JSON,
DATA_COMPRESSION = 'org.apache.hadoop.io.compress.SnappyCodec'
);
SELECT *
FROM
OPENROWSET(
BULK 'https://gen2storeaccount.blob.core.windows.net/coldcontainer/833cae0e-634c-4bd0-acce-13d8713ce490',
FORMAT = 'CSV',
FIELDQUOTE = '0x0b',
FIELDTERMINATOR ='0x0b',
ROWTERMINATOR = '0x0b'
)
WITH (
jsonContent varchar(MAX)
) AS [result]
CROSS APPLY OPENJSON(jsoncontent)
WITH
(
id INT,
title NVARCHAR(100),
author NVARCHAR(100),
genre NVARCHAR(50),
year INT
)
CREATE VIEW BooksView AS
SELECT
id,
title,
author,
genre,
year
FROM
OPENROWSET(
BULK 'https://gen2storeaccount.blob.core.windows.net/coldcontainer/833cae0e-634c-4bd0-acce-13d8713ce490',
FORMAT = 'JSON',
DATA_SOURCE = 'demodatasource'
) AS [Books];
File 'https://gen2storeaccount.blob.core.windows.net/coldcontainer/833cae0e-634c-4bd0-acce-13d8713ce490' cannot be opened because it does not exist or it is used by another process. Visit this article to learn more about this error
Azure Synapse Analytics
Azure Synapse Analytics
An Azure analytics service that brings together data integration, enterprise data warehousing, and big data analytics. Previously known as Azure SQL Data Warehouse.
5,373 questions
Sign in to answer