Class BigQueryHelpers
java.lang.Object
org.apache.beam.sdk.io.gcp.bigquery.BigQueryHelpers
A set of helper functions and classes used by 
BigQueryIO.- 
Constructor Summary
Constructors - 
Method Summary
Modifier and TypeMethodDescriptiondataCatalogSegments(TableReference ref, BigQueryOptions options) static <T> @PolyNull TfromJsonString(@PolyNull String json, Class<T> clazz) static @Nullable BigIntegergetNumRows(BigQueryOptions options, TableReference tableRef) It returns the number of rows for a given table.getTable(BigQueryOptions options, TableReference tableRef) static TableReferenceparseTableSpec(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 TableReferenceparseTableUrn(String tableUrn) static StringstripPartitionDecorator(String tableSpec) Strip off any partition decorator information from a tablespec.toJsonString(@PolyNull Object item) static StringReturns a canonical string representation of theTableReference. 
- 
Constructor Details
- 
BigQueryHelpers
public BigQueryHelpers() 
 - 
 - 
Method Details
- 
toTableSpec
Returns a canonical string representation of theTableReference. - 
dataCatalogSegments
 - 
parseTableSpec
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]".If the project id is omitted, the default project id is used.
 - 
parseTableUrn
 - 
stripPartitionDecorator
Strip off any partition decorator information from a tablespec. - 
toJsonString
 - 
fromJsonString
 - 
getNumRows
public static @Nullable BigInteger getNumRows(BigQueryOptions options, TableReference tableRef) throws InterruptedException, IOException It returns the number of rows for a given table.- Returns:
 - The number of rows in the table or null if it cannot get any estimate.
 - Throws:
 InterruptedExceptionIOException
 - 
getTable
public static @Nullable Table getTable(BigQueryOptions options, TableReference tableRef) throws InterruptedException, IOException - Throws:
 InterruptedExceptionIOException
 
 -