////
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 Load File Content In Memory transform loads the content of a file in memory.

= image:transforms/icons/loadfileinput.svg[Load file content in memory transform Icon, role="image-doc-icon"] Load file content in memory

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

The Load File Content In Memory transform loads the content of a file in memory.

|
== 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
|Filename is defined in a field|Takes a filename from a field
|get filename from a field|A field containing the filename
|File or directory|The file or directory path to be added
|Add|Adds the file or directory to the selected files
|Browse|Uses the local file browser to select a path
|Regular Expression|Allows files to be included based on a regular expression
|Exclude Regular Expression|Allows files to be excluded based on a regular expression
|Selected files|The selected files to load into memory
|Show filename(s)|Previews the selected files
|===

=== Content Tab

[options="header"]
|===
|Option|Description
|Encoding|The file encoding (UTF, ISO, ...)
|Ignore empty file|Ignores empty files
|Ignore missing path|Ignores missing paths
|Limit|Limit the rows loaded from the file
|Include filename in output?|Allows the filename to be included in the output
|Filename fieldname|Field containing the filename
|Rownum in output?|Allows the row number to be included in the output
|Rownum filename|Field containing the row number
|Add files to result filesname|Add files to resulting files name
|===

=== Fields Tab

The fields to load from the file.

[options="header"]
|===
|Option|Description
|Name|The name of the imported field.
|Element|File content or size
|Type|The data type for this field
|Format|The format mask
|Length|The field length
|Precision|The precision option depends on the field type, but only Number is supported; it returns the number of floating point digits
|Currency|Symbol used to represent currencies
|Decimal|A decimal point; this is either a dot or a comma
|Group|A method of separating units of thousands in numbers of four digits or larger.
This is either a dot or a comma.
|Trim type|Type of trim: none, left, right, both
|Repeat|Enter ‘Y’ if you want to reuse the value from the last non-empty row when the corresponding value in this row is empty.
Enter ‘N’ to leave the row empty.
|Get fields|Retrieve available fields based on the file contents
|===

=== Additional output Tab

[options="header"]
|===
|Option|Description
|Short filename field|The field name that contains the filename without path information but with an extension.
|Extension field|The field name that contains the extension of the filename.
|Path field|The field name that contains the path in operating system format.
|Is hidden field|The field name that contains if the file is hidden or not (boolean).
|Last modification field|The field name that contains the last modification.
|Uri field|The field name that contains the URI.
|Root uri field|The field name that contains only the root part of the URI.
|===

=== Buttons

[options="header"]
|===
|Option|Description
|Preview rows|Preview the rows generated by this transform.
|===
