@Experimental 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. |
static TestUnboundedTable |
of(java.lang.Object... args)
Convenient way to build a mocked unbounded table.
|
TestUnboundedTable |
timestampColumnIndex(int idx) |
buildIOWriter
getSchema
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 timestampColumnIndex(int idx)
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.