@Internal public class TextTable extends BaseBeamTable
TextTable
is a BeamSqlTable
that reads text
files and converts them according to the specified format.
Support formats are "csv"
and "lines"
.
CSVFormat
itself has many dialects, check its javadoc for more info.
schema
Constructor and Description |
---|
TextTable(Schema schema,
java.lang.String filePattern,
PTransform<PCollection<java.lang.String>,PCollection<Row>> readConverter,
PTransform<PCollection<Row>,PCollection<java.lang.String>> writeConverter)
Text table with the specified read and write transforms.
|
Modifier and Type | Method and Description |
---|---|
PCollection<Row> |
buildIOReader(PBegin begin)
create a
PCollection<Row> from source. |
PDone |
buildIOWriter(PCollection<Row> input)
create a
IO.write() instance to write to target. |
java.lang.String |
getFilePattern() |
getSchema
public TextTable(Schema schema, java.lang.String filePattern, PTransform<PCollection<java.lang.String>,PCollection<Row>> readConverter, PTransform<PCollection<Row>,PCollection<java.lang.String>> writeConverter)
public java.lang.String getFilePattern()
public PCollection<Row> buildIOReader(PBegin begin)
BeamSqlTable
PCollection<Row>
from source.public PDone buildIOWriter(PCollection<Row> input)
BeamSqlTable
IO.write()
instance to write to target.