I verified this does work with CETAS, even if there isn't an explicit example in the docs.
You need to create an external datasource where the new table will be located:
CREATE EXTERNAL DATA SOURCE [ExternalDataSource] WITH
(
LOCATION = 'https://<STORAGEACCOUNT>.blob.core.windows.net/<CONTAINER>'
)
And a file format, which is simply parquet + the data compression style:
CREATE EXTERNAL FILE FORMAT snappy
WITH
(
FORMAT_TYPE = PARQUET,
DATA_COMPRESSION = 'org.apache.hadoop.io.compress.SnappyCodec'
)
Once that is done, just feed your OPENROWSET into the external table command just like it is for your view:
CREATE EXTERNAL TABLE table_name
WITH (
LOCATION = 'external_tables/',
DATA_SOURCE = ExternalDataSource,
FILE_FORMAT = snappy
)
AS
select *, r.filepath(1) as Year, r.filepath(2) as Month from
OPENROWSET (
BULK 'Year=*/Month=*/*.parquet',
DATA_SOURCE = 'mysample',
FORMAT ='PARQUET'
) as [r]