@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() |
PCollection.IsBounded |
isBounded()
Whether this table is bounded (known to be finite) or unbounded (may or may not be finite).
|
getSchemapublic 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.IsBounded isBounded()
BeamSqlTablepublic PCollection<Row> buildIOReader(PBegin begin)
BeamSqlTablePCollection<Row> from source.public PDone buildIOWriter(PCollection<Row> input)
BeamSqlTableIO.write() instance to write to target.