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,365 questions
This browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
Suppose I have a parquet folder
table/year/month/*.parquet
and my query is
SELECT count()
FROM OPENROWSET(BULK '/path/table/2021/10/.parquet',DATA_SOURCE='source',FORMAT = 'PARQUET')
AS a
the above is for one year and
what if I would like to do for two years 2021 and 2020 ? what's the syntax
SELECT count()
FROM OPENROWSET(BULK '/path/table/2021,2020/10/.parquet',DATA_SOURCE='source',FORMAT = 'PARQUET')
AS a
You can do this by using a combination of wildcard (*) and filepath()
function:
SELECT count()
FROM OPENROWSET(BULK '/path/table/202*/10/.parquet',DATA_SOURCE='source',FORMAT = 'PARQUET')
AS a
WHERE
a.filepath(3) IN (2020,2021)