input_file_block_length function

Applies to: check marked yes Databricks SQL check marked yes Databricks Runtime

Returns the length in bytes of the block being read.

This function is not available on Unity Catalog.

In Databricks SQL and Databricks Runtime 13.3 LTS and above this function is deprecated. Please use _metadata.file_block_length.

Syntax

input_file_block_length()

Arguments

This function takes no arguments.

Returns

A BIGINT.

If the information is not available -1 is returned.

The function is non-deterministic.

Examples

> SELECT input_file_block_length();
 -1