/**
* @param Path|string $path
* @param bool $empty_to_null - @deprecated use $loader->withEmptyToNull() instead
* @param bool $with_header - @deprecated use $loader->withHeader() instead
* @param null|string $separator - @deprecated use $loader->withSeparator() instead
* @param null|string $enclosure - @deprecated use $loader->withEnclosure() instead
* @param null|string $escape - @deprecated use $loader->withEscape() instead
* @param int<1, max> $characters_read_in_line - @deprecated use $loader->withCharactersReadInLine() instead
* @param null|Schema $schema - @deprecated use $loader->withSchema() instead
*/
from_csv(Path|string $path, bool $with_header, bool $empty_to_null, ?string $separator, ?string $enclosure, ?string $escape, int $characters_read_in_line, ?Schema $schema) : CSVExtractor
Extracts
Read from various data sources.
Transforms
Shape and optimize for your needs.
Loads
Store and secure in one of many available data sinks.
Modules
DSL Functions
DSL stands for Domain Specific Language. In the case of Flow, the DSL is used to define simple functions that can be used to transform data. Most of those functions are initializing a new instance of a class under the hood since Flow is fully object-oriented. Please look at the examples below to get a better understanding of how to use the DSL functions.
EXTRACTOR
HELPER
/**
* @param SourceStream $stream - valid resource to CSV file
* @param int<1, max> $lines - number of lines to read from CSV file, default 5, more lines means more accurate detection but slower detection
* @param null|Option $fallback - fallback option to use when no best option can be detected, default is Option(',', '"', '\\')
* @param null|Options $options - options to use for detection, default is Options::all()
*/
csv_detect_separator(SourceStream $stream, int $lines, ?Option $fallback, ?Options $options) : Option
LOADER
/**
* @param Path|string $uri
* @param bool $with_header - @deprecated use $loader->withHeader() instead
* @param string $separator - @deprecated use $loader->withSeparator() instead
* @param string $enclosure - @deprecated use $loader->withEnclosure() instead
* @param string $escape - @deprecated use $loader->withEscape() instead
* @param string $new_line_separator - @deprecated use $loader->withNewLineSeparator() instead
* @param string $datetime_format - @deprecated use $loader->withDateTimeFormat() instead
*/
to_csv(Path|string $uri, bool $with_header, string $separator, string $enclosure, string $escape, string $new_line_separator, string $datetime_format) : CSVLoader