FL_IS_COMPRESSED

Checks if the input is a compressed FILE.

Syntax

Use one of the following:

FL_IS_COMPRESSED( <file_expression> )

FL_IS_COMPRESSED( <variant_expression> )
Copy

Arguments

file_expression

The argument must be an expression of type FILE.

variant_expression

The argument must be an OBJECT representing a FILE.

Returns

The function returns a BOOLEAN.

Examples

Example using an input FILE.

create table file_table(f file);
insert into file_table select to_file(build_stage_file_url('@mystage', 'image.png'));
Copy
select fl_is_compressed(f) from file_table;

+---------------------+
| FL_IS_COMPRESSED(F) |
|---------------------|
| False               |
+---------------------+
Copy

Example using an input OBJECT.

create table file_table(f object);
insert into file_table select object_construct('STAGE', 'MYSTAGE', 'RELATIVE_PATH', 'document.pdf.gz', 'ETAG', '85522e3bd0e4bbb930237f886db3bcee', 'LAST_MODIFIED', 'Wed, 11 Dec 2024 20:24:00 GMT', 'SIZE', 105859, 'FILE_TYPE', 'application/gzip');
Copy
select fl_is_compressed(f) from file_table;

+---------------------+
| FL_IS_COMPRESSED(F) |
|---------------------|
| True                |
+---------------------+
Copy
Language: English