flow php

UNIFIED DATA PROCESSING FRAMEWORK

composer require flow-php/etl ^0.10.0

Changelog

elephant
extract

Extracts

Read from various data sources.

arrow
transform

Transforms

Shape and optimize for your needs.

arrow
load

Loads

Store and secure in one of many available data sinks.

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


/**
 *  In order to iterate only over <element> nodes use `from_xml($file)->withXMLNodePath('root/elements/element')`.
 *
 *  <root>
 *    <elements>
 *      <element></element>
 *      <element></element>
 *    <elements>
 *  </root>
 *
 *  XML Node Path does not support attributes and it's not xpath, it is just a sequence
 *  of node names separated with slash.
 *
 * @param Path|string $path
 * @param string $xml_node_path - @deprecated use `from_xml($file)->withXMLNodePath($xmlNodePath)` method instead
 */
from_xml(Path|string $path, string $xml_node_path) : XMLParserExtractor

LOADER


/**
 * @param Path|string $path
 * @param string $root_element_name - @deprecated use `withRootElementName()` method instead
 * @param string $row_element_name - @deprecated use `withRowElementName()` method instead
 * @param string $attribute_prefix - @deprecated use `withAttributePrefix()` method instead
 * @param string $date_time_format - @deprecated use `withDateTimeFormat()` method instead
 * @param DOMDocumentWriter $xml_writer
 */
to_xml(Path|string $path, string $root_element_name, string $row_element_name, string $attribute_prefix, string $date_time_format, XMLWriter $xml_writer) : XMLLoader

Contributors

Join us on GitHub external resource
scroll back to top