public class BigQueryUtils
extends java.lang.Object
| Modifier and Type | Field and Description |
|---|---|
static int |
POLL_WAIT_INITIAL_MILLIS |
static int |
POLL_WAIT_INTERVAL_MAX_MILLIS |
static int |
POLL_WAIT_MAX_ELAPSED_MILLIS |
| Constructor and Description |
|---|
BigQueryUtils() |
| Modifier and Type | Method and Description |
|---|---|
static java.util.List<com.google.api.services.bigquery.model.TableFieldSchema> |
getSchemaFromString(java.lang.String fields)
Parses the given JSON string and returns the extracted schema.
|
static void |
waitForJobCompletion(com.google.api.services.bigquery.Bigquery bigquery,
java.lang.String projectId,
com.google.api.services.bigquery.model.JobReference jobReference,
org.apache.hadoop.util.Progressable progressable)
Polls job until it is completed.
|
public static final int POLL_WAIT_INITIAL_MILLIS
public static final int POLL_WAIT_INTERVAL_MAX_MILLIS
public static final int POLL_WAIT_MAX_ELAPSED_MILLIS
public static void waitForJobCompletion(com.google.api.services.bigquery.Bigquery bigquery,
java.lang.String projectId,
com.google.api.services.bigquery.model.JobReference jobReference,
org.apache.hadoop.util.Progressable progressable)
throws java.io.IOException,
java.lang.InterruptedException
bigquery - the Bigquery instance to poll.projectId - the project that is polling.jobReference - the job to poll.progressable - to get progress of task.java.io.IOException - on IO Error.java.lang.InterruptedException - on sleep interrupt.public static java.util.List<com.google.api.services.bigquery.model.TableFieldSchema> getSchemaFromString(java.lang.String fields)
fields - a string to read the TableSchema from.Copyright © 2019. All rights reserved.