Class TestBoundedTable
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.test.TestTable
org.apache.beam.sdk.extensions.sql.meta.provider.test.TestBoundedTable
- All Implemented Interfaces:
Serializable
,BeamSqlTable
Mocked table for bounded data sources.
- See Also:
-
Field Summary
Fields inherited from class org.apache.beam.sdk.extensions.sql.meta.SchemaBaseBeamTable
schema
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionAdd rows to the builder.buildIOReader
(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).static TestBoundedTable
Convenient way to build a mocked bounded table.static TestBoundedTable
Build a mocked bounded table with the specified type.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
-
TestBoundedTable
-
-
Method Details
-
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). -
of
Convenient way to build a mocked bounded table.e.g.
TestUnboundedTable .of(Types.BIGINT, "order_id", Types.INTEGER, "site_id", Types.DOUBLE, "price", Types.TIMESTAMP, "order_time")
-
of
Build a mocked bounded table with the specified type. -
addRows
Add rows to the builder.Sample usage:
addRows( 1, 3, "james", -- first row 2, 5, "bond" -- second row ... )
-
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.- Specified by:
buildIOWriter
in interfaceBeamSqlTable
- Overrides:
buildIOWriter
in classTestTable
-