public class BigQueryConfiguration
extends java.lang.Object
| Modifier and Type | Field and Description |
|---|---|
static java.lang.String |
DATA_LOCATION_DEFAULT
The default dataset location is US
|
static java.lang.String |
DATA_LOCATION_KEY
Configure the location of the temporary dataset.
|
static boolean |
DELETE_EXPORT_FILES_FROM_GCS_DEFAULT |
static java.lang.String |
DELETE_EXPORT_FILES_FROM_GCS_KEY
Configuration key for whether to delete the intermediate GCS-export files.
|
static boolean |
DELETE_INTERMEDIATE_TABLE_DEFAULT |
static java.lang.String |
DELETE_INTERMEDIATE_TABLE_KEY
Deprecated.
Tables exist outside the scope of MapReduces; use BigQuery CLI instead.
|
static int |
DYNAMIC_FILE_LIST_RECORD_READER_POLL_INTERVAL_MS_DEFAULT |
static java.lang.String |
DYNAMIC_FILE_LIST_RECORD_READER_POLL_INTERVAL_MS_KEY
Number of milliseconds to wait between listStatus calls inside of nextKeyValue when no
new files are available yet for reading; not that this polling is not done when files
are already available for reading.
|
static java.lang.String |
ENABLE_ASYNC_WRITE
Obsolete; no longer affects any behavior.
|
static boolean |
ENABLE_ASYNC_WRITE_DEFAULT |
static boolean |
ENABLE_SHARDED_EXPORT_DEFAULT |
static java.lang.String |
ENABLE_SHARDED_EXPORT_KEY
Deprecated.
Configuration key specifying whether to start the map phase concurrently with the
BigQuery export. Since BigQuery exports are significantly faster than when this was
implemented it is no longer suggested.
|
static java.lang.String |
GCS_BUCKET_KEY
Configuration key for the GCS bucket holding TEMP_GCS_PATH_KEY
|
static java.lang.String |
INPUT_DATASET_ID_KEY
Configuration key for ID of the dataset accessed by this input connector.
|
static java.lang.String |
INPUT_PROJECT_ID_KEY
Configuration key for project ID of the dataset accessed by this input connector.
|
static java.lang.String |
INPUT_QUERY_KEY
Deprecated.
Issue queries from the BigQuery command-line tool instead, outside of a MapReduce.
|
static java.lang.String |
INPUT_TABLE_ID_KEY
Configuration key for ID of the table written by this input connector.
|
static com.google.common.collect.ImmutableList<java.lang.String> |
MANDATORY_CONFIG_PROPERTIES_INPUT
A list of all necessary Configuration keys for input connector.
|
static com.google.common.collect.ImmutableList<java.lang.String> |
MANDATORY_CONFIG_PROPERTIES_OUTPUT
A list of all necessary Configuration keys.
|
static java.lang.String |
OUTPUT_CLEANUP_TEMP_KEY
Configuration key indicating whether temporary data stored in GCS should be deleted after the
output job is complete.
|
static java.lang.String |
OUTPUT_DATASET_ID_KEY
Configuration key for numeric ID of the output dataset accessed by the output format.
|
static java.lang.String |
OUTPUT_FILE_FORMAT_KEY
Configuration key for the file format of the files outputted by the wrapped FileOutputFormat.
|
static java.lang.String |
OUTPUT_FORMAT_CLASS_KEY
Configuration key for the FileOutputFormat class that's going to be wrapped by the output
format.
|
static java.lang.String |
OUTPUT_PROJECT_ID_KEY
Configuration key for the output project ID of the dataset accessed by the output format.
|
static java.lang.String |
OUTPUT_TABLE_ID_KEY
Configuration key for numeric ID of the output table written by the output format.
|
static java.lang.String |
OUTPUT_TABLE_KMS_KEY_NAME_KEY
Configuration key for the Cloud KMS encryption key that will be used to protect output BigQuery
table.
|
static java.lang.String |
OUTPUT_TABLE_PARTITIONING_KEY
Configuration key for the output table partitioning used by the output format.
|
static java.lang.String |
OUTPUT_TABLE_SCHEMA_KEY
Configuration key for the output table schema used by the output format.
|
static java.lang.String |
OUTPUT_TABLE_WRITE_DISPOSITION_DEFAULT
The default write disposition for the output table.
|
static java.lang.String |
OUTPUT_TABLE_WRITE_DISPOSITION_KEY
Configuration key for the write disposition of the output table.
|
static int |
OUTPUT_WRITE_BUFFER_SIZE_DEFAULT
64MB default write buffer size.
|
static java.lang.String |
OUTPUT_WRITE_BUFFER_SIZE_KEY
Size of the output buffer, in bytes, to use for BigQuery output.
|
static java.lang.String |
PROJECT_ID_KEY
Configuration key for project ID on whose behalf to perform BigQuery operations, and the
default project for referencing datasets when input/output datasets are not explicitly
specified.
|
static java.lang.String |
TEMP_GCS_PATH_KEY
Configuration key for the GCS temp path this connector uses.
|
| Constructor and Description |
|---|
BigQueryConfiguration() |
| Modifier and Type | Method and Description |
|---|---|
static void |
configureBigQueryInput(org.apache.hadoop.conf.Configuration config,
java.lang.String fullyQualifiedInputTableId)
Sets the Bigquery access related fields in the JobConf for input connector.
|
static void |
configureBigQueryInput(org.apache.hadoop.conf.Configuration config,
java.lang.String projectId,
java.lang.String datasetId,
java.lang.String tableId)
Sets the Bigquery access related fields in the JobConf for input connector.
|
static void |
configureBigQueryOutput(org.apache.hadoop.conf.Configuration config,
java.lang.String fullyQualifiedOutputTableId,
java.lang.String tableSchema)
Sets the Bigquery access related fields in the JobConf for output connector.
|
static void |
configureBigQueryOutput(org.apache.hadoop.conf.Configuration config,
java.lang.String projectId,
java.lang.String datasetId,
java.lang.String tableId,
java.lang.String tableSchema)
Sets the Bigquery access related fields in the JobConf for output connector.
|
static java.lang.String |
getTemporaryPathRoot(org.apache.hadoop.conf.Configuration conf,
org.apache.hadoop.mapreduce.JobID jobId)
Resolves to provided
TEMP_GCS_PATH_KEY or fallbacks to a temporary path based on
GCS_BUCKET_KEY and jobId. |
public static final java.lang.String PROJECT_ID_KEY
public static final java.lang.String INPUT_PROJECT_ID_KEY
public static final java.lang.String INPUT_DATASET_ID_KEY
public static final java.lang.String INPUT_TABLE_ID_KEY
@Deprecated public static final java.lang.String INPUT_QUERY_KEY
public static final java.lang.String TEMP_GCS_PATH_KEY
public static final java.lang.String GCS_BUCKET_KEY
@Deprecated public static final java.lang.String DELETE_INTERMEDIATE_TABLE_KEY
public static final boolean DELETE_INTERMEDIATE_TABLE_DEFAULT
public static final java.lang.String DELETE_EXPORT_FILES_FROM_GCS_KEY
public static final boolean DELETE_EXPORT_FILES_FROM_GCS_DEFAULT
@Deprecated public static final java.lang.String ENABLE_SHARDED_EXPORT_KEY
public static final boolean ENABLE_SHARDED_EXPORT_DEFAULT
public static final java.lang.String DYNAMIC_FILE_LIST_RECORD_READER_POLL_INTERVAL_MS_KEY
public static final int DYNAMIC_FILE_LIST_RECORD_READER_POLL_INTERVAL_MS_DEFAULT
public static final com.google.common.collect.ImmutableList<java.lang.String> MANDATORY_CONFIG_PROPERTIES_INPUT
public static final java.lang.String OUTPUT_PROJECT_ID_KEY
String.public static final java.lang.String OUTPUT_DATASET_ID_KEY
String.public static final java.lang.String OUTPUT_TABLE_ID_KEY
String.public static final java.lang.String OUTPUT_TABLE_SCHEMA_KEY
String.public static final java.lang.String OUTPUT_TABLE_PARTITIONING_KEY
String.public static final java.lang.String OUTPUT_TABLE_KMS_KEY_NAME_KEY
String.public static final java.lang.String OUTPUT_TABLE_WRITE_DISPOSITION_KEY
String.public static final java.lang.String OUTPUT_TABLE_WRITE_DISPOSITION_DEFAULT
public static final java.lang.String OUTPUT_FILE_FORMAT_KEY
BigQueryFileFormat.public static final java.lang.String OUTPUT_FORMAT_CLASS_KEY
Class.public static final java.lang.String OUTPUT_CLEANUP_TEMP_KEY
Boolean.public static final java.lang.String OUTPUT_WRITE_BUFFER_SIZE_KEY
public static final int OUTPUT_WRITE_BUFFER_SIZE_DEFAULT
public static final java.lang.String DATA_LOCATION_KEY
public static final java.lang.String DATA_LOCATION_DEFAULT
public static final com.google.common.collect.ImmutableList<java.lang.String> MANDATORY_CONFIG_PROPERTIES_OUTPUT
public static final java.lang.String ENABLE_ASYNC_WRITE
public static final boolean ENABLE_ASYNC_WRITE_DEFAULT
public static void configureBigQueryInput(org.apache.hadoop.conf.Configuration config,
java.lang.String projectId,
java.lang.String datasetId,
java.lang.String tableId)
throws java.io.IOException
config - the job configuration.projectId - the project containing the table to read the intermediate results to.datasetId - the dataset to write the intermediate results to.tableId - the table to write the intermediate results to.java.io.IOExceptionpublic static void configureBigQueryInput(org.apache.hadoop.conf.Configuration config,
java.lang.String fullyQualifiedInputTableId)
throws java.io.IOException
config - the job configuration.fullyQualifiedInputTableId - input-table id of the form
[optional projectId]:[datasetId].[tableId]java.io.IOExceptionpublic static void configureBigQueryOutput(org.apache.hadoop.conf.Configuration config,
java.lang.String projectId,
java.lang.String datasetId,
java.lang.String tableId,
java.lang.String tableSchema)
throws java.io.IOException
config - the job configuration.projectId - the project containing the table to write the results to.datasetId - the dataset to write the results to.tableId - the table to write the results to.tableSchema - the output table schema used by this output connector.java.io.IOExceptionpublic static void configureBigQueryOutput(org.apache.hadoop.conf.Configuration config,
java.lang.String fullyQualifiedOutputTableId,
java.lang.String tableSchema)
throws java.io.IOException
config - the job configuration.fullyQualifiedOutputTableId - output-table id of the form
[optional projectId]:[datasetId].[tableId]tableSchema - the output table schema used by this output connector.java.io.IOExceptionpublic static java.lang.String getTemporaryPathRoot(org.apache.hadoop.conf.Configuration conf,
@Nullable
org.apache.hadoop.mapreduce.JobID jobId)
throws java.io.IOException
TEMP_GCS_PATH_KEY or fallbacks to a temporary path based on
GCS_BUCKET_KEY and jobId.conf - the configuration to fetch the keys from.jobId - the ID of the job requesting a working path. Optional (could be null) if
TEMP_GCS_PATH_KEY is provided.java.io.IOException - if the file system of the derived working path isn't a derivative of
GoogleHadoopFileSystemBase.Copyright © 2019. All rights reserved.