Issue in External Table

Rohit Kulkarni 731 Reputation points
2024-04-09T13:52:33.6+00:00

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

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,309 questions
{count} votes

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.