@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. |
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 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
buildIOReader, constructFilter, supportsProjects
public TestBoundedTable(Schema beamSchema)
public BeamTableStatistics getTableStatistics(PipelineOptions options)
BeamSqlTable
getTableStatistics
in interface BeamSqlTable
getTableStatistics
in class BaseBeamTable
public PCollection.IsBounded isBounded()
BeamSqlTable
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