public class BigQueryHelpers
extends java.lang.Object
BigQueryIO
.Constructor and Description |
---|
BigQueryHelpers() |
Modifier and Type | Method and Description |
---|---|
static java.util.List<java.lang.String> |
dataCatalogSegments(TableReference ref,
BigQueryOptions options) |
static <T> T |
fromJsonString(@PolyNull java.lang.String json,
java.lang.Class<T> clazz) |
static @Nullable java.math.BigInteger |
getNumRows(BigQueryOptions options,
TableReference tableRef)
It returns the number of rows for a given table.
|
static @Nullable Table |
getTable(BigQueryOptions options,
TableReference tableRef) |
static TableReference |
parseTableSpec(java.lang.String tableSpec)
Parse a table specification in the form
"[project_id]:[dataset_id].[table_id]" or
"[project_id].[dataset_id].[table_id]" or "[dataset_id].[table_id]" . |
static TableReference |
parseTableUrn(java.lang.String tableUrn) |
static java.lang.String |
stripPartitionDecorator(java.lang.String tableSpec)
Strip off any partition decorator information from a tablespec.
|
static @PolyNull java.lang.String |
toJsonString(@PolyNull java.lang.Object item) |
static java.lang.String |
toTableSpec(TableReference ref)
Returns a canonical string representation of the
TableReference . |
public static java.lang.String toTableSpec(TableReference ref)
TableReference
.public static java.util.List<java.lang.String> dataCatalogSegments(TableReference ref, BigQueryOptions options)
public static TableReference parseTableSpec(java.lang.String tableSpec)
"[project_id]:[dataset_id].[table_id]"
or
"[project_id].[dataset_id].[table_id]"
or "[dataset_id].[table_id]"
.
If the project id is omitted, the default project id is used.
public static TableReference parseTableUrn(java.lang.String tableUrn)
public static java.lang.String stripPartitionDecorator(java.lang.String tableSpec)
public static @PolyNull java.lang.String toJsonString(@PolyNull java.lang.Object item)
public static <T> T fromJsonString(@PolyNull java.lang.String json, java.lang.Class<T> clazz)
public static @Nullable java.math.BigInteger getNumRows(BigQueryOptions options, TableReference tableRef) throws java.lang.InterruptedException, java.io.IOException
java.lang.InterruptedException
java.io.IOException
public static @Nullable Table getTable(BigQueryOptions options, TableReference tableRef) throws java.lang.InterruptedException, java.io.IOException
java.lang.InterruptedException
java.io.IOException