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

# fl_get_size

> Extracts the size field of a FILE value.

**Experimental feature**

[Advice on use of experimental features](/documents/4.2/maturity/features.md)

Extracts the `size` field of a [FILE](/documents/4.2/sql-reference/data-types/other-data-types/FILE.md) value.

## Syntax

```sql theme={null}
BIGINT fl_get_size(FILE file_expr)
```

## Parameters

`file_expr`: a FILE expression, such as the result of [to\_file](/documents/4.2/sql-reference/sql-functions/file-functions/to_file.md) or [try\_to\_file](/documents/4.2/sql-reference/sql-functions/file-functions/try_to_file.md).

## Return value

Returns a BIGINT value. Returns NULL if the FILE value or the `size` field is NULL. The field is returned unchanged, with no defaults.

## Examples

### Example 1: Extract the field

```sql theme={null}
SELECT fl_get_size(to_file(named_struct('uri', 'a.jpg', 'size', 12))) AS file_size;
```

```plaintext theme={null}
+-----------+
| file_size |
+-----------+
| 12        |
+-----------+
```

### Example 2: The field is NULL

```sql theme={null}
SELECT fl_get_size(to_file(named_struct('uri', 'a.jpg'))) AS file_size;
```

```plaintext theme={null}
+-----------+
| file_size |
+-----------+
| NULL      |
+-----------+
```

## keyword

FL\_GET\_SIZE, FILE


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.