public class TestUnboundedTable extends TestTable
schema
Modifier and Type | Method and Description |
---|---|
TestUnboundedTable |
addRows(Duration duration,
java.lang.Object... args)
Add rows to the builder.
|
PCollection<Row> |
buildIOReader(PBegin begin)
create a
PCollection<Row> from source. |
BeamTableStatistics |
getTableStatistics(PipelineOptions options)
Estimates the number of rows or the rate for unbounded Tables.
|
PCollection.IsBounded |
isBounded()
Whether this table is bounded (known to be finite) or unbounded (may or may not be finite).
|
static TestUnboundedTable |
of(java.lang.Object... args)
Convenient way to build a mocked unbounded table.
|
TestUnboundedTable |
setStatistics(BeamTableStatistics statistics) |
TestUnboundedTable |
timestampColumnIndex(int idx) |
buildIOWriter
getSchema
buildIOReader, constructFilter, supportsProjects
public static TestUnboundedTable of(java.lang.Object... args)
e.g.
TestUnboundedTable
.of(Types.BIGINT, "order_id",
Types.INTEGER, "site_id",
Types.DOUBLE, "price",
Types.TIMESTAMP, "order_time")
public TestUnboundedTable setStatistics(BeamTableStatistics statistics)
public BeamTableStatistics getTableStatistics(PipelineOptions options)
BeamSqlTable
getTableStatistics
in interface BeamSqlTable
getTableStatistics
in class BaseBeamTable
public TestUnboundedTable timestampColumnIndex(int idx)
public PCollection.IsBounded isBounded()
BeamSqlTable
public TestUnboundedTable addRows(Duration duration, java.lang.Object... args)
Sample usage:
addRows(
duration, -- duration which stands for the corresponding watermark instant
1, 3, "james", -- first row
2, 5, "bond" -- second row
...
)
public PCollection<Row> buildIOReader(PBegin begin)
BeamSqlTable
PCollection<Row>
from source.