Help Center/ AI DataLake/ Spark reference/ Datasets/ Dataset Syntax/ Reading Files of a Specified Format in a Dataset
Updated on 2026-11-06 GMT+08:00

Reading Files of a Specified Format in a Dataset

Syntax

SELECT * FROM <fileformat>.`/Datasets/<catalog>/<schema>/<dataset>/<relative_path_to_file>`
  • fileformat: indicates the file format being read.
  • Datasets is a prefix used to identify a dataset path.
  • CATALOG, SCHEMA, and DATASET are used to identify the dataset to which this relative file path belongs. The location is obtained from the dataset.
  • The remaining part (relative_path_to_file.parquet) is the relative file path resolved relative to the location obtained from the dataset.

Sample Code

SELECT * FROM parquet.`/Datasets/cat1/sch1/dataset1/file.parquet`