////
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 YAML Input transform reads data from YAML structures, files or incoming fields.

= image:transforms/icons/yamlinput.svg[YAML Input transform Icon, role="image-doc-icon"] YAML Input

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

The YAML Input transform reads data from YAML structures, files or incoming fields.

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

== Options

=== File Tab

[options="header"]
|===
|Option|Description
|Transform name|Name of the transform.
|Source is defined in a field?|Whether or not the source is in a field from a previous transform.
|Source is a filename|Whether or not the source is a filename, else a directory.
|get source from a field|The field containing the filename or directory.
|File or directory|The file or directory path.
|Add|Adds the file or directory to the Selected files list.
|Browse|Browses the local filesystem for a file or directory.
|Regular Expression|
|Selected files|The selected files or directories.
|Delete|Deletes selected lines from the list.
|Edit|Moved the selected line for editting.
|Show filename(s)|Previews the filename.
|===

=== Content Tab

[options="header"]
|===
|Option|Description
|Ignore empty file|Whether or not to ignore empty files.
|Do not raise an error if no files|Whether or not the raise an error if no files are available.
|Limit|Sets a limit to be read.
|Include filename in output?|Adds the filename to the output rows.
|Filename fieldname|The field containing the filename.
|Rownum in output?|Adds the row number to the output rows.
|Rownum fieldname|The field containing the row number.
|Add files to result filesname|
|===

=== Fields Tab

[options="header"]
|===
|Option|Description
|Name|The name of the output field.
|Key|The key to the element.
|Type|The data type to convert to.
|Format|The format or conversion mask to use in the data type conversion.
|Length|The length of the output data type.
|Precision|The precision of the output data type.
|Currency|The currency symbol to use during data type conversion.
|Decimal|The numeric decimal symbol to use during data type conversion.
|Group|The numeric grouping symbol to use during data type conversion.
|Trim type|The type of trimming to use during data type conversion.
|Get fields|Approximates fields from the input.
|===