public class BigQueryHelpers
extends java.lang.Object
BigQueryIO
.Constructor and Description |
---|
BigQueryHelpers() |
Modifier and Type | Method and Description |
---|---|
static <T> T |
fromJsonString(java.lang.String json,
java.lang.Class<T> clazz) |
static java.math.BigInteger |
getNumRows(BigQueryOptions options,
TableReference tableRef)
It returns the number of rows for a given table.
|
static TableReference |
parseTableSpec(java.lang.String tableSpec)
Parse a table specification in the form
"[project_id]:[dataset_id].[table_id]" or
"[dataset_id].[table_id]" . |
static java.lang.String |
stripPartitionDecorator(java.lang.String tableSpec)
Strip off any partition decorator information from a tablespec.
|
static java.lang.String |
toJsonString(java.lang.Object item) |
static java.lang.String |
toTableSpec(TableReference ref)
Returns a canonical string representation of the
TableReference . |
static java.lang.String |
toTableSpec(com.google.cloud.bigquery.storage.v1beta1.TableReferenceProto.TableReference ref)
Returns a canonical string representation of a
TableReferenceProto.TableReference . |
public static java.lang.String toTableSpec(TableReference ref)
TableReference
.public static java.lang.String toTableSpec(com.google.cloud.bigquery.storage.v1beta1.TableReferenceProto.TableReference ref)
TableReferenceProto.TableReference
.public static TableReference parseTableSpec(java.lang.String tableSpec)
"[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 java.lang.String stripPartitionDecorator(java.lang.String tableSpec)
public static java.lang.String toJsonString(java.lang.Object item)
public static <T> T fromJsonString(java.lang.String json, java.lang.Class<T> clazz)
@Nullable public static java.math.BigInteger getNumRows(BigQueryOptions options, TableReference tableRef) throws java.lang.InterruptedException, java.io.IOException
java.lang.InterruptedException
java.io.IOException