The functions were created to:

  • speed up the creation of your integrations even more

  • decrease the complexity of your pipelines

  • simplify data conversions and transformations during the flow of your pipelines

The file functions make queries to metadata and make validations in files and are available for components that support Double Braces expressions. To know how to provide information to the components using this resource, click here.

FILEEXISTS

This function in Double Braces allows you to discover if a file exists in the virtual directory of the pipeline deployment.

Syntax

FILEEXISTS(file)

  • file: name of the file in the virtual directory of the pipeline

The function returns “true” when the file is found and “false” when it's not found.

FILESIZE

This function in Double Braces allows you to obtain the size of a file in the virtual directory of the pipeline deployment.

Syntax

FILESIZE(file)

  • file: name of the file in the virtual directory of the pipeline

Let's say you need to obtain the size of the file created one step before the use of the File Writer component. If its file name configuration in File Writer was "file.txt", then use the following extract in the JSON Generator component:

{
"fileSize": {{ FILESIZE("arquivo.txt") }}
}

The result would be:

{
"fileSize": 1000
}

  • fileSize: value representing the size of the file

You can also read about these functions:

Did this answer your question?