Class HealthcareIOErrorToTableRow<T>
java.lang.Object
org.apache.beam.sdk.io.gcp.healthcare.HealthcareIOErrorToTableRow<T>
- Type Parameters:
 T- the type parameter for theHealthcareIOError
- All Implemented Interfaces:
 Serializable,ProcessFunction<HealthcareIOError<T>,,TableRow> SerializableFunction<HealthcareIOError<T>,TableRow> 
public class HealthcareIOErrorToTableRow<T>
extends Object
implements SerializableFunction<HealthcareIOError<T>,TableRow> 
Convenience transform to write dead-letter 
HealthcareIOErrors to BigQuery TableRows.
 This can be used with BigQueryIO.Write.withSchema(TableSchema) by defining a dead
 letter table schema
 
 ...
 PCollection<HealthcareIOError<String>> errors = ...;
 TableSchema deadLetterSchema = new TableSchema();
 deadLetterSchema.setFields(HealthcareIOErrorToTableRow.TABLE_FIELD_SCHEMAS);
 TimePartitioning deadLetterPartitioning = new TimeParitioning();
 deadLetterPartitioning.setField(HealthcareIOErrorToTableRow.TIMESTAMP_FIELD_NAME);
 errors.apply(
    BigQueryIO.write()
      .to(options.getDeadLetterTable())
      .withFormatFunction(new HealthcareIOErrorToTableRow())
      .withSchema(deadLetterSchema)
      .withTimePartitioning(deadLetterPartitioning)
 );
 ***
 - See Also:
 
- 
Field Summary
Fields - 
Constructor Summary
Constructors - 
Method Summary
Modifier and TypeMethodDescriptionapply(HealthcareIOError<T> err) Returns the result of invoking this function on the given input. 
- 
Field Details
- 
TIMESTAMP_FIELD_NAME
- See Also:
 
 - 
TABLE_FIELD_SCHEMAS
 
 - 
 - 
Constructor Details
- 
HealthcareIOErrorToTableRow
public HealthcareIOErrorToTableRow() 
 - 
 - 
Method Details
- 
apply
Description copied from interface:SerializableFunctionReturns the result of invoking this function on the given input.- Specified by:
 applyin interfaceProcessFunction<HealthcareIOError<T>,TableRow> - Specified by:
 applyin interfaceSerializableFunction<HealthcareIOError<T>,TableRow> 
 
 -