Package google.registry.beam
Class BeamUtils
java.lang.Object
google.registry.beam.BeamUtils
Static utilities for
Beam
pipelines.-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic void
checkFieldsNotNull
(com.google.common.collect.ImmutableList<String> fieldNames, org.apache.beam.sdk.io.gcp.bigquery.SchemaAndRecord schemaAndRecord) Checks that no expected fields in the record are missing.static String
createJobName
(String prefix, Clock clock) Creates a beam job name and validates that it conforms to the requirements.static String
extractField
(org.apache.avro.generic.GenericRecord record, String fieldName) Extracts a string representation of a field in aGenericRecord
.
-
Constructor Details
-
BeamUtils
public BeamUtils()
-
-
Method Details
-
extractField
Extracts a string representation of a field in aGenericRecord
. -
checkFieldsNotNull
public static void checkFieldsNotNull(com.google.common.collect.ImmutableList<String> fieldNames, org.apache.beam.sdk.io.gcp.bigquery.SchemaAndRecord schemaAndRecord) Checks that no expected fields in the record are missing.Note that this simply makes sure the field is not null; it may still generate a parse error when interpreting the string representation of an object.
- Throws:
IllegalStateException
- if the record returns null for any field infieldNames
-
createJobName
Creates a beam job name and validates that it conforms to the requirements.
-