跳到主要内容

Table Functions

This page provides reference information for the table functions in Databend. Table functions return a set of rows (similar to a table) and can be used in the FROM clause of a query.

Data Exploration Functions

FunctionDescriptionExample
INFER_SCHEMADetects file metadata schema and retrieves column definitionsSELECT * FROM INFER_SCHEMA(LOCATION => '@mystage/data/')
INSPECT_PARQUETInspects the structure of Parquet filesSELECT * FROM INSPECT_PARQUET(LOCATION => '@mystage/data.parquet')
LIST_STAGELists files in a stageSELECT * FROM LIST_STAGE(LOCATION => '@mystage/data/')
RESULT_SCANRetrieves the result set of a previous querySELECT * FROM RESULT_SCAN(LAST_QUERY_ID())

Data Generation Functions

FunctionDescriptionExample
GENERATE_SERIESGenerates a sequence of valuesSELECT * FROM GENERATE_SERIES(1, 10, 2)

System Management Functions

FunctionDescriptionExample
SHOW_GRANTSShows granted privilegesSELECT * FROM SHOW_GRANTS()
SHOW_VARIABLESShows system variablesSELECT * FROM SHOW_VARIABLES()
STREAM_STATUSShows stream status informationSELECT * FROM STREAM_STATUS('mystream')
TASK_HISTROYShows task execution historySELECT * FROM TASK_HISTROY('mytask')
FUSE_VACUUM_TEMPORARY_TABLECleans up temporary tablesSELECT * FROM FUSE_VACUUM_TEMPORARY_TABLE()
FUSE_AMENDManages data amendmentsSELECT * FROM FUSE_AMEND()

Iceberg Integration Functions

FunctionDescriptionExample
ICEBERG_MANIFESTShows Iceberg table manifest informationSELECT * FROM ICEBERG_MANIFEST('mytable')
ICEBERG_SNAPSHOTShows Iceberg table snapshot informationSELECT * FROM ICEBERG_SNAPSHOT('mytable')
开始使用 Databend Cloud
低成本
快速分析
多种数据源
弹性扩展
注册