Data.read_many
Data.read_manypaths formatreturnon_problems
Group: Input
Aliases: load
, open
Documentation
Reads a a list of files into Enso.
Arguments
paths
: A list of files to load. It can be a Vector, Column or Table of files, paths or URIs to fetch. If a Table is provided, it must either contain a single column or a column calledpath
(case insensitive).format
: AFile_Format
object used to read files into memory. IfAuto_Detect
is specified; each file determines the specific type and configures it appropriately. If there is no matching type then aFile_Error.Unsupported_Type
error is returned.return
: Specifies the shape of the data to return.on_problems
: Specifies the behavior when a problem occurs during the function. By default, if one of the files fails to load, a warning is issued and the entry for that file becomesNothing
, but the operation proceeds. If set toReport_Error
, the operation fails with a dataflow error on the first failing file. If set toIgnore
, the operation proceeds without errors or warnings, replacing files that fail to load withNothing
.
Examples
Read all CSV files from a directory into a single merged table.
from Standard.Table import all
import Standard.Examples
files = Data.list name_filter="*.csv"
example_csv_dir_to_table = Data.read_many files
Remarks
Request Caching
Responses to HTTP data requests are cached, and additional requests for the same resources will use the cache, saving a round-trip call to the remote server. Two resources are considered the same if the URIs and request headers are the same. Header order does not affect sameness.
The cache respects the "max-age" and "Age" response headers; see
Data.fetch
for more details.
The cached values are retained as long as the project remains open. Closing a project will clear the cache.