Flow PHP

CSVExtractor implements BatchableExtractor, Extractor, FileExtractor, InfersSchema, MetadataColumnsExtractor, CorruptedRecordsRouter, SplittableExtractor

FinalYes

Interfaces

BatchableExtractor
Extractor
FileExtractor
InfersSchema
MetadataColumnsExtractor
CorruptedRecordsRouter
SplittableExtractor

Methods

__construct()  : mixed
batchSize()  : int<1, max>
corruptedRecordsLoader()  : Loader|null
extract()  : Generator<Signal|null, void>
inferSchema()  : static
isRepeatable()  : bool
partitionSchema()  : Schema
partitionTypes()  : static
prunes()  : bool
reader()  : FileSplitReader
refresh()  : void
schema()  : Schema
source()  : Path
splits()  : array<int, FileSplit>
Byte windows over every admitted file, cut by arithmetic alone; the read resyncs both ends of a window to a record start (CSVRecordResync), so a quoted newline never splits a record and no record is read twice.
statistics()  : Statistics
Rows come from the sample schema inference already read; without one they are unknown, a sniff is never run just for them.
withBatchSize()  : static
withBOMRemoval()  : self
withCharactersReadInLine()  : self
withCorruptedRecords()  : static
withEmptyToNull()  : self
withEnclosure()  : self
withEscape()  : self
withHeader()  : self
withMetadataColumns()  : static
withMissingColumnsAsNull()  : self
withSchema()  : static
withSeparator()  : self

Methods

__construct()

public __construct(Path $path[, Filesystem $filesystem = new NativeLocalFilesystem() ]) : mixed
Parameters
$path : Path
$filesystem : Filesystem = new NativeLocalFilesystem()

batchSize()

public batchSize() : int<1, max>
Return values
int<1, max>

corruptedRecordsLoader()

public corruptedRecordsLoader() : Loader|null
Return values
Loader|null

extract()

public extract(Backend $backend, Criteria $criteria) : Generator<Signal|null, void>
Parameters
$backend : Backend
$criteria : Criteria
Return values
Generator<Signal|null, void>

inferSchema()

public inferSchema(SchemaInferenceBuilder $builder) : static
Parameters
$builder : SchemaInferenceBuilder
Return values
static

isRepeatable()

public isRepeatable() : bool
Return values
bool

partitionSchema()

public partitionSchema() : Schema
Return values
Schema

partitionTypes()

public partitionTypes(PartitionTypes $types) : static
Parameters
$types : PartitionTypes
Return values
static

prunes()

public prunes(ScalarFunction $conjunct) : bool
Parameters
$conjunct : ScalarFunction
Return values
bool

reader()

public reader() : FileSplitReader
Return values
FileSplitReader

splits()

Byte windows over every admitted file, cut by arithmetic alone; the read resyncs both ends of a window to a record start (CSVRecordResync), so a quoted newline never splits a record and no record is read twice.

public splits(Criteria $criteria, int $targetSplitBytes) : array<int, FileSplit>
Parameters
$criteria : Criteria
$targetSplitBytes : int
Return values
array<int, FileSplit>

statistics()

Rows come from the sample schema inference already read; without one they are unknown, a sniff is never run just for them.

public statistics() : Statistics
Return values
Statistics

withBatchSize()

public withBatchSize(int $batchSize) : static
Parameters
$batchSize : int
Return values
static

withBOMRemoval()

public withBOMRemoval(bool $removeBOM) : self
Parameters
$removeBOM : bool
Return values
self

withCharactersReadInLine()

public withCharactersReadInLine(int $charactersReadInLine) : self
Parameters
$charactersReadInLine : int
  • bytes read per step from a remote stream (S3, Azure); never splits a line
Return values
self

withCorruptedRecords()

public withCorruptedRecords(Loader|null $loader) : static
Parameters
$loader : Loader|null
Return values
static

withEmptyToNull()

public withEmptyToNull(bool $emptyToNull) : self
Parameters
$emptyToNull : bool
Return values
self

withEnclosure()

public withEnclosure(string $enclosure) : self
Parameters
$enclosure : string
Return values
self

withEscape()

public withEscape(string $escape) : self
Parameters
$escape : string
Return values
self

withHeader()

public withHeader(bool $withHeader) : self
Parameters
$withHeader : bool
Return values
self

withMetadataColumns()

public withMetadataColumns(bool $addMetadataColumns) : static
Parameters
$addMetadataColumns : bool
Return values
static

withMissingColumnsAsNull()

public withMissingColumnsAsNull(bool $missingColumnsAsNull) : self
Parameters
$missingColumnsAsNull : bool
Return values
self

withSchema()

public withSchema(Schema $schema) : static
Parameters
$schema : Schema
Return values
static

withSeparator()

public withSeparator(string $separator) : self
Parameters
$separator : string
Return values
self
On this page

Search results