.withTestServices(fakeBqServices) .withoutValidation(); readTransform = useTemplateCompatibility ? read.withTemplateCompatibility() : read;
@Override public PCollectionTuple expand(PBegin begin) { return begin .apply( "AvroToEntity", BigQueryIO.read( AvroToEntity.newBuilder() .setEntityKind(entityKind()) .setUniqueNameColumn(uniqueNameColumn()) .setNamespace(namespace()) .build()) .fromQuery(query()) .withoutValidation() .withTemplateCompatibility() .usingStandardSql()) .apply( "CheckNoKey", CheckNoKey.newBuilder() .setFailureTag(failureTag()) .setSuccessTag(successTag()) .build()); } }
/** * Use new template-compatible source implementation. * * <p>Use new template-compatible source implementation. This implementation is compatible with * repeated template invocations. It does not support dynamic work rebalancing. */ @Experimental(Experimental.Kind.SOURCE_SINK) public Read withTemplateCompatibility() { return new Read(this.inner.withTemplateCompatibility()); } }