> ## Documentation Index
> Fetch the complete documentation index at: https://docs.firebolt.io/llms.txt
> Use this file to discover all available pages before exploring further.

> Overview of the Firebolt table-valued functions for reading DuckLake tables backed by a PostgreSQL catalog and Parquet data files.

# DuckLake functions

DuckLake functions provide table-valued functions for reading [DuckLake](https://ducklake.select/) tables. DuckLake keeps table metadata in a SQL catalog database (PostgreSQL) and stores the underlying data as Parquet files in object storage or on a local filesystem.

<Warning>
  DuckLake support is **experimental** and may change. Only DuckLake catalogs hosted on **PostgreSQL** are supported.
</Warning>

## Reading DuckLake data

Use the [`READ_DUCKLAKE`](/reference-sql/functions-reference/ducklake/read_ducklake) table-valued function to query a DuckLake table. Firebolt recommends storing the catalog connection string and storage credentials in a [location object](/reference-sql/commands/data-definition/create-location-ducklake):

```sql theme={"theme":{"light":"css-variables","dark":"css-variables"}}
CREATE LOCATION my_ducklake_loc WITH
  SOURCE = DUCKLAKE
  CATALOG = 'postgresql://dl_user:dl_pw@127.0.0.1:5432/dl_db';

SELECT *
FROM READ_DUCKLAKE(
  LOCATION => 'my_ducklake_loc',
  TABLE => 'my_first_ducklake_table'
)
LIMIT 5;
```

## Inspecting DuckLake data files

Use the [`LIST_DUCKLAKE_FILES`](/reference-sql/functions-reference/ducklake/list_ducklake_files) table-valued function to list the Parquet data files behind a table, with per-file metadata and per-column statistics:

```sql theme={"theme":{"light":"css-variables","dark":"css-variables"}}
SELECT file_name, record_count, file_size
FROM LIST_DUCKLAKE_FILES(
  LOCATION => 'my_ducklake_loc',
  TABLE => 'my_first_ducklake_table'
);
```

## Available functions

**Table-valued functions:**

* [`READ_DUCKLAKE`](/reference-sql/functions-reference/ducklake/read_ducklake) — Read data from a DuckLake table.
* [`LIST_DUCKLAKE_FILES`](/reference-sql/functions-reference/ducklake/list_ducklake_files) — List the data files that make up a DuckLake table.

## Related

* [CREATE LOCATION (DuckLake)](/reference-sql/commands/data-definition/create-location-ducklake) — Store catalog connection details and credentials in a reusable location object.
* [Query DuckLake tables with Firebolt Core](/guides/iceberg-and-data-lake/ducklake) — A step-by-step guide to setting up a DuckLake catalog and reading it from Firebolt.
