@Experimental
public class TestTableUtils
extends java.lang.Object
| Constructor and Description |
|---|
TestTableUtils() |
| Modifier and Type | Method and Description |
|---|---|
static org.apache.beam.sdk.schemas.Schema |
buildBeamSqlSchema(java.lang.Object... args)
Create a RowsBuilder with the specified row type info.
|
static java.util.List<org.apache.beam.sdk.values.Row> |
buildRows(org.apache.beam.sdk.schemas.Schema type,
java.util.List<?> rowsValues)
Convenient way to build a
BeamSqlRows. |
static org.apache.beam.sdk.schemas.Schema.Field |
toRecordField(java.lang.Object[] args,
int i) |
public static org.apache.beam.sdk.schemas.Schema buildBeamSqlSchema(java.lang.Object... args)
For example:
TestUtils.RowsBuilder.of(
Types.INTEGER, "order_id",
Types.INTEGER, "sum_site_id",
Types.VARCHAR, "buyer"
)
args - pairs of column type and column names.public static org.apache.beam.sdk.schemas.Schema.Field toRecordField(java.lang.Object[] args,
int i)
public static java.util.List<org.apache.beam.sdk.values.Row> buildRows(org.apache.beam.sdk.schemas.Schema type,
java.util.List<?> rowsValues)
BeamSqlRows.
e.g.
buildRows(
schema,
1, 1, 1, // the first row
2, 2, 2, // the second row
...
)