@Experimental public class TestBoundedTable extends TestTable
schema
Constructor and Description |
---|
TestBoundedTable(Schema beamSchema) |
Modifier and Type | Method and Description |
---|---|
TestBoundedTable |
addRows(java.lang.Object... args)
Add rows to the builder.
|
PCollection<Row> |
buildIOReader(PBegin begin)
create a
PCollection<Row> from source. |
POutput |
buildIOWriter(PCollection<Row> input)
create a
IO.write() instance to write to target. |
static TestBoundedTable |
of(java.lang.Object... args)
Convenient way to build a mocked bounded table.
|
static TestBoundedTable |
of(Schema type)
Build a mocked bounded table with the specified type.
|
getSchema
public TestBoundedTable(Schema beamSchema)
public static TestBoundedTable 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 static TestBoundedTable of(Schema type)
public TestBoundedTable addRows(java.lang.Object... args)
Sample usage:
addRows(
1, 3, "james", -- first row
2, 5, "bond" -- second row
...
)
public PCollection<Row> buildIOReader(PBegin begin)
BeamSqlTable
PCollection<Row>
from source.public POutput buildIOWriter(PCollection<Row> input)
BeamSqlTable
IO.write()
instance to write to target.buildIOWriter
in interface BeamSqlTable
buildIOWriter
in class TestTable