My question revolves around kicking off a API call to get the file prefix for TextIO
output.
Here is what I have now (and works):
results.get(validRecords).setCoder(StringUtf8Coder.of()).apply(Window.<String>into(Sessions.withGapDuration(Duration.standardMinutes(1)))).apply("WriteValidRecords",TextIO.write().to(cloudStorageValidfile).withSuffix(".csv").withWindowedWrites().withNumShards(1));
This is what I changed it too:
results.get(validRecords).setCoder(StringUtf8Coder.of()).apply(Window.<String>into(Sessions.withGapDuration(Duration.standardSeconds(60)))).apply("WriteRecords", TextIO.write().to(API-CALL).withWindowedWrites().withSuffix("csv").withNumShards(1));
It seems with the API call, it only gets called once on instantiation, then continually uses the same prefix. Is there a way to force a call each time?