PhpJsonOpenSource implements JsonOpenSource
Read onlyYes
FinalYes
Interfaces
Methods
- __construct() : mixed
- batches() : Generator<int, CorruptedRecordException|Rows>
- Batches of exactly $batchSize rows (the last may be shorter), keyed and ordered by $schema, and every corrupted record handed up in record order. This instance is consumed afterwards.
- close() : void
- JsonFileReader::sample() opens and closes its own stream.
Methods
__construct()
public
__construct(JsonFileReader $reader, SourceFile $source[, FileSplit|null $window = null ]) : mixed
Parameters
- $reader : JsonFileReader
- $source : SourceFile
- $window : FileSplit|null = null
batches()
Batches of exactly $batchSize rows (the last may be shorter), keyed and ordered by $schema, and every corrupted record handed up in record order. This instance is consumed afterwards.
public
batches(Schema $schema, int $batchSize, Backend $backend[, SchemaInference|null $inference = null ][, Schema|null $known = null ]) : Generator<int, CorruptedRecordException|Rows>
Parameters
- $schema : Schema
- $batchSize : int
- $backend : Backend
- $inference : SchemaInference|null = null
-
the inference that made $schema; null when it was declared
- $known : Schema|null = null
-
the schema the user sees, $schema plus the file's own columns
Return values
Generator<int, CorruptedRecordException|Rows>close()
JsonFileReader::sample() opens and closes its own stream.
public
close() : void