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 TestBoundedTableConvenient way to build a mocked bounded table.static TestBoundedTableBuild a mocked bounded table with the specified type.Methods inherited from class org.apache.beam.sdk.extensions.sql.meta.SchemaBaseBeamTable
getSchemaMethods inherited from class org.apache.beam.sdk.extensions.sql.meta.BaseBeamTable
buildIOReader, constructFilter, supportsProjects
-
Constructor Details
-
TestBoundedTable
-
-
Method Details
-
getTableStatistics
Description copied from interface:BeamSqlTableEstimates 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:
getTableStatisticsin interfaceBeamSqlTable- Overrides:
getTableStatisticsin classBaseBeamTable
-
isBounded
Description copied from interface:BeamSqlTableWhether 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:BeamSqlTablecreate aPCollection<Row>from source. -
buildIOWriter
Description copied from interface:BeamSqlTablecreate aIO.write()instance to write to target.- Specified by:
buildIOWriterin interfaceBeamSqlTable- Overrides:
buildIOWriterin classTestTable
-