Hi I want to dynamic create table on the fly in Dataflow pipelnie
First, I capture BigQueryIO WriteResult, then use it to create table
WriteResult writeResult =
incomingRecords.apply(
"WriteToBigQuery",
BigQueryIO.<TableRowWithSchema>write()
.to(new DynamicTables())
.withFormatFunction(TableRowWithSchema::getTableRow)
.withCreateDisposition(BigQueryIO.Write.CreateDisposition.CREATE_NEVER)
.withWriteDisposition(BigQueryIO.Write.WriteDisposition.WRITE_APPEND)
.withFailedInsertRetryPolicy(InsertRetryPolicy.retryTransientErrors()));
But I still meet table not found Exception
Caused by: org.apache.beam.sdk.Pipeline$PipelineExecutionException: java.lang.RuntimeException: com.google.api.client.googleapis.json.GoogleJsonResponseException: 404 Not Found
{
"code" : 404,
"errors" : [ {
"domain" : "global",
"message" : "Not found: Table projectId:datasetId.StreamComment",
"reason" : "notFound"
} ],
"message" : "Not found: Table projectId:datasetId.StreamComment",
"status" : "NOT_FOUND"
}
is anything wrong ? thanks