////
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements.  See the NOTICE file
distributed with this work for additional information
regarding copyright ownership.  The ASF licenses this file
to you under the Apache License, Version 2.0 (the
"License"); you may not use this file except in compliance
with the License.  You may obtain a copy of the License at
  http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing,
software distributed under the License is distributed on an
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
KIND, either express or implied.  See the License for the
specific language governing permissions and limitations
under the License.
////
:documentationPath: /pipeline/transforms/
:language: en_US
:description: The Files To Result transform allows you to set filenames in the internal result files of a pipeline, for use by subsequent workflow actions. Subsequent workflow actions can then use this information

= image:transforms/icons/filestoresult.svg[Files to result transform Icon, role="image-doc-icon"] Files to result

[%noheader,cols="3a,1a", role="table-no-borders" ]
|===
|
== Description

The Files To Result transform allows you to set filenames in the internal result files of a pipeline.

Subsequent workflow actions can then use this information as it routes the list of files to the result files stream e.g. by using the Get files from result transform or some workflow actions that can process on the list of result files.

For example, the Mail workflow action can use this list of files to attach to a mail, so perhaps you don't want all files sent, but only a certain selection.

For this, you can create a pipeline that sets exactly those files you want to attach.

WARNING: the Files To Result is available for historical reasons. Check the xref:best-practices/index.adoc[Best Practices] for better ways to build loops in your Hop pipelines.

|
== Supported Engines
[%noheader,cols="2,1a",frame=none, role="table-supported-engines"]
!===
!Hop Engine! image:check_mark.svg[Supported, 24]
!Spark! image:cross.svg[Not Supported, 24]
!Flink! image:cross.svg[Not Supported, 24]
!Dataflow! image:cross.svg[Not Supported, 24]
!===
|===

== Options

[options="header"]
|===
|Option|Description
|Transform name|The name of this transform as it appears in the pipeline workspace.
|Filename field|Field that contains the filenames of the files to copy.
|Type of file to|Select the type of file to set in results.
|===