跳到主要内容

Working with File and Column Metadata

The following file-level metadata fields are available for the supported file formats:

File MetadataTypeDescription
METADATA$FILENAMEVARCHARThe name of the file from which the row was read
METADATA$FILE_ROW_NUMBERINTThe row number within the file (starting from 0)

These metadata fields are available in:

  • SELECT queries over stages (e.g., SELECT FROM @stage)
  • COPY INTO <table> statements

Detailed Guides for Querying Metadata

File FormatGuide
ParquetQuerying Parquet Files with Metadata
CSVQuerying CSV Files with Metadata
TSVQuerying TSV Files with Metadata
NDJSONQuerying NDJSON Files with Metadata
ORCQuerying ORC Files with Metadata
AvroQuerying Avro Files with Metadata
开始使用 Databend Cloud
低成本
快速分析
多种数据源
弹性扩展
注册