Class TextTable
java.lang.Object
org.apache.beam.sdk.extensions.sql.meta.BaseBeamTable
org.apache.beam.sdk.extensions.sql.meta.SchemaBaseBeamTable
org.apache.beam.sdk.extensions.sql.meta.provider.text.TextTable
- All Implemented Interfaces:
Serializable
,BeamSqlTable
- Direct Known Subclasses:
TextJsonTable
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.
- See Also:
-
Field Summary
Fields inherited from class org.apache.beam.sdk.extensions.sql.meta.SchemaBaseBeamTable
schema
-
Constructor Summary
ConstructorsConstructorDescriptionTextTable
(Schema schema, String filePattern, PTransform<PCollection<String>, PCollection<Row>> readConverter, PTransform<PCollection<Row>, PCollection<String>> writeConverter) Text table with the specified read and write transforms. -
Method Summary
Modifier and TypeMethodDescriptionbuildIOReader
(PBegin begin) create aPCollection<Row>
from source.buildIOWriter
(PCollection<Row> input) create aIO.write()
instance to write to target.getTableStatistics
(PipelineOptions options) Estimates the number of rows or the rate for unbounded Tables.Whether this table is bounded (known to be finite) or unbounded (may or may not be finite).Methods inherited from class org.apache.beam.sdk.extensions.sql.meta.SchemaBaseBeamTable
getSchema
Methods inherited from class org.apache.beam.sdk.extensions.sql.meta.BaseBeamTable
buildIOReader, constructFilter, supportsProjects
-
Constructor Details
-
TextTable
public TextTable(Schema schema, String filePattern, PTransform<PCollection<String>, PCollection<Row>> readConverter, PTransform<PCollection<Row>, PCollection<String>> writeConverter) Text table with the specified read and write transforms.
-
-
Method Details
-
getFilePattern
-
getTableStatistics
Description copied from interface:BeamSqlTable
Estimates the number of rows or the rate for unbounded Tables. If it is not possible to estimate the row count or rate it will return BeamTableStatistics.BOUNDED_UNKNOWN.- Specified by:
getTableStatistics
in interfaceBeamSqlTable
- Overrides:
getTableStatistics
in classBaseBeamTable
-
isBounded
Description copied from interface:BeamSqlTable
Whether this table is bounded (known to be finite) or unbounded (may or may not be finite). -
buildIOReader
Description copied from interface:BeamSqlTable
create aPCollection<Row>
from source. -
buildIOWriter
Description copied from interface:BeamSqlTable
create aIO.write()
instance to write to target.
-