Enum Class BigQueryIO.Write.Method
- All Implemented Interfaces:
Serializable
,Comparable<BigQueryIO.Write.Method>
,Constable
- Enclosing class:
BigQueryIO.Write<T>
Determines the method used to insert data in BigQuery.
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>>
-
Enum Constant Summary
Enum ConstantsEnum ConstantDescriptionThe default behavior if no method is explicitly set.Use BigQuery load jobs to insert data.Use the new, Storage Write API without exactly once enabled.Use the new, exactly-once Storage Write API.Use the BigQuery streaming insert API to insert data. -
Method Summary
Modifier and TypeMethodDescriptionstatic BigQueryIO.Write.Method
Returns the enum constant of this class with the specified name.static BigQueryIO.Write.Method[]
values()
Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
DEFAULT
The default behavior if no method is explicitly set. If the input is bounded, then file loads will be used. If the input is unbounded, then streaming inserts will be used. -
FILE_LOADS
Use BigQuery load jobs to insert data. Records will first be written to files, and these files will be loaded into BigQuery. This is the default method when the input is bounded. This method can be chosen for unbounded inputs as well, as long as a triggering frequency is also set usingBigQueryIO.Write.withTriggeringFrequency(org.joda.time.Duration)
. BigQuery has daily quotas on the number of load jobs allowed per day, so be careful not to set the triggering frequency too frequent. For more information, see Loading Data from Cloud Storage. -
STREAMING_INSERTS
Use the BigQuery streaming insert API to insert data. This provides the lowest-latency insert path into BigQuery, and therefore is the default method when the input is unbounded. BigQuery will make a strong effort to ensure no duplicates when using this path, however there are some scenarios in which BigQuery is unable to make this guarantee (see https://cloud.google.com/bigquery/streaming-data-into-bigquery). A query can be run over the output table to periodically clean these rare duplicates. Alternatively, using theFILE_LOADS
insert method does guarantee no duplicates, though the latency for the insert into BigQuery will be much higher. For more information, see Streaming Data into BigQuery. -
STORAGE_WRITE_API
Use the new, exactly-once Storage Write API. -
STORAGE_API_AT_LEAST_ONCE
Use the new, Storage Write API without exactly once enabled. This will be cheaper and provide lower latency, however comes with the caveat that the output table may contain duplicates.
-
-
Method Details
-
values
Returns an array containing the constants of this enum class, in the order they are declared.- Returns:
- an array containing the constants of this enum class, in the order they are declared
-
valueOf
Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)- Parameters:
name
- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException
- if this enum class has no constant with the specified nameNullPointerException
- if the argument is null
-