public class TestBoundedTable extends TestTable
schema| Constructor and Description |
|---|
TestBoundedTable(org.apache.beam.sdk.schemas.Schema beamSchema) |
| Modifier and Type | Method and Description |
|---|---|
TestBoundedTable |
addRows(java.lang.Object... args)
Add rows to the builder.
|
org.apache.beam.sdk.values.PCollection<org.apache.beam.sdk.values.Row> |
buildIOReader(org.apache.beam.sdk.values.PBegin begin)
create a
PCollection<Row> from source. |
org.apache.beam.sdk.values.POutput |
buildIOWriter(org.apache.beam.sdk.values.PCollection<org.apache.beam.sdk.values.Row> input)
create a
IO.write() instance to write to target. |
BeamTableStatistics |
getTableStatistics(org.apache.beam.sdk.options.PipelineOptions options)
Estimates the number of rows or the rate for unbounded Tables.
|
org.apache.beam.sdk.values.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(org.apache.beam.sdk.schemas.Schema type)
Build a mocked bounded table with the specified type.
|
getSchemabuildIOReader, constructFilter, supportsProjectspublic TestBoundedTable(org.apache.beam.sdk.schemas.Schema beamSchema)
public BeamTableStatistics getTableStatistics(org.apache.beam.sdk.options.PipelineOptions options)
BeamSqlTablegetTableStatistics in interface BeamSqlTablegetTableStatistics in class BaseBeamTablepublic org.apache.beam.sdk.values.PCollection.IsBounded isBounded()
BeamSqlTablepublic 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(org.apache.beam.sdk.schemas.Schema type)
public TestBoundedTable addRows(java.lang.Object... args)
Sample usage:
addRows(
1, 3, "james", -- first row
2, 5, "bond" -- second row
...
)
public org.apache.beam.sdk.values.PCollection<org.apache.beam.sdk.values.Row> buildIOReader(org.apache.beam.sdk.values.PBegin begin)
BeamSqlTablePCollection<Row> from source.public org.apache.beam.sdk.values.POutput buildIOWriter(org.apache.beam.sdk.values.PCollection<org.apache.beam.sdk.values.Row> input)
BeamSqlTableIO.write() instance to write to target.buildIOWriter in interface BeamSqlTablebuildIOWriter in class TestTable