In this article:
Overview
Users have the ability to add a custom name to their output files within the Chain.io platform. This feature can be found in your Flow configuration under Advanced Settings.
With your Flow configurations you can specify a custom file name format to use for all output files within the flow.
How To Set Up A Custom Filename For Output
To utilize this feature and set up a custom file name format for your Flow execution follow these steps.
First, navigate to the Integration that contains the Flow you would like to set up this custom name for output files.
Next, select Advanced Options from the sidebar or scroll down to Advanced Options panel in the Flow configuration view
At the bottom of the Advanced Options panel there is a field labeled Output Filename Format.
In this field enter the format you would like to use for the name of output files. This is entered as template variables so they can be applied to each output file. The options available to users are as follows:
{{index}}
- A number incremented for each file in the output payload, starting at "1".
- "1"
{{uuid}}
- A unique identifier
- "bc2d4243-ac3f-4706-a74b-e2f6c4718312"
{{epochms}}
- The datetime at which the file is renamed. {{epochms}} will always resolve to a unique millisecond value for each file in an Execution.
- "1699379459505"
{{date}}
|{{date "format"}}
- Current date in specified format or in "yyyy-MM-dd"
format
- the format to follow when generating the date. Defaults to “yyyy-MM-dd”. See Luxon documentation for more information.- "2023-11-07"
{{ext}}
|{{ext "default"}}
- File extension from the corresponding source file, or the
default
value if no extension is present. If nodefault
value is provided and a source file extension could be found, the extension will be omitted. default
- the default value to output if no filename extension is found on corresponding source file.- ".json"
- File extension from the corresponding source file, or the
{{original_basename}}
- File name of the corresponding source file without extension.
- "some_input_file_basename"
Example
An Output Filename Format of report_{{date "yyyy"}}_{{epochms}}_{{index}}{{ext}}
would produce a filename such as report_2023_1699622449478_1.json
.
Comments
0 comments
Article is closed for comments.