Class TestUnboundedTable
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.TestUnboundedTable
- All Implemented Interfaces:
Serializable
,BeamSqlTable
A mocked unbounded table.
- See Also:
-
Field Summary
Fields inherited from class org.apache.beam.sdk.extensions.sql.meta.SchemaBaseBeamTable
schema
-
Method Summary
Modifier and TypeMethodDescriptionAdd rows to the builder.buildIOReader
(PBegin begin) create aPCollection<Row>
from source.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 TestUnboundedTable
Convenient way to build a mocked unbounded table.setStatistics
(BeamTableStatistics statistics) timestampColumnIndex
(int idx) Methods inherited from class org.apache.beam.sdk.extensions.sql.meta.provider.test.TestTable
buildIOWriter
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
-
Method Details
-
of
Convenient way to build a mocked unbounded table.e.g.
TestUnboundedTable .of(Types.BIGINT, "order_id", Types.INTEGER, "site_id", Types.DOUBLE, "price", Types.TIMESTAMP, "order_time")
-
setStatistics
-
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
-
timestampColumnIndex
-
isBounded
Description copied from interface:BeamSqlTable
Whether this table is bounded (known to be finite) or unbounded (may or may not be finite). -
addRows
Add rows to the builder.Sample usage:
addRows( duration, -- duration which stands for the corresponding watermark instant 1, 3, "james", -- first row 2, 5, "bond" -- second row ... )
-
buildIOReader
Description copied from interface:BeamSqlTable
create aPCollection<Row>
from source.
-