Issue in External Table
Rohit Kulkarni
731
Reputation points
Hello team,
I have created the external table in the below format:
CREATE EXTERNAL TABLE [Sh].[Dim]
(
[col1] [nvarchar](max) NOT NULL,
[col2] [int] NOT NULL,
[col3] [int] NOT NULL,
[col4] [int] NOT NULL,
[col5] [int] NOT NULL
)
WITH (DATA_SOURCE = [RawAccessTypeAugmented],
LOCATION = '/Dim/*.parquet',
FILE_FORMAT = [Parque],
REJECT_TYPE = VALUE,
REJECT_VALUE = 0)
CREATE EXTERNAL FILE FORMAT [Parque] WITH (FORMAT_TYPE = PARQUET)
CREATE EXTERNAL DATA SOURCE [RawAccessTypeAugmented]
WITH (LOCATION = N'abfss://******@dwhblob01.dfs.core.windows.net',
CREDENTIAL = [RawAccessTypeAugmented1])
But when i try to run the script
select * from [Sh].[Dim] I am getting error mentioned below :
COPY statement input file schema discovery failed: Error encountered while parsing data: 'Invalid: Parquet magic bytes not found in footer. Either the file is corrupted or this is not a parquet file.'. It might happen for one of the various reasons: \n1. Parquet file is corrupted. \n2. The file size defined in the metadata is smaller than the actual size of the file. \n3. Wrong file type ingested. \n4. The file changed during the query execution. \nUnderlying data description: file 'https://blob01.dfs.core.windows.net/datalake/Dim/Dim.parquet'.
In the respective path the file is present and even able to download and open the file. But i am getting above mentioned error .
Please advise
RK
Sign in to answer