So, I'm trying to read the schema file into an PCollection using TextIO from bucket and make a TableSchema object out of it to feed it to BigQueryIO.Write.withSchema(). Here's bit of code
`final TupleTag\ tableSchemaTag = new TupleTag\(){};
final TupleTag\ schemaStartTag = new TupleTag\(){};
Now, when I pass this 'tableSchema' to .withSchema(), it gives out this error and i know this is coz it accepts only TableSchema object. Is there any way around this?
incompatible types: com.google.cloud.dataflow.sdk.values.PCollection<com.google.api.services.bigquery.model.TableSchema> cannot be converted to com.google.api.services.bigquery.model.TableSchema
So, I'm trying to read the schema file into an PCollection using TextIO from bucket and make a TableSchema object out of it to feed it to BigQueryIO.Write.withSchema(). Here's bit of code `final TupleTag\ tableSchemaTag = new TupleTag\(){};
final TupleTag\ schemaStartTag = new TupleTag\(){};
PCollection\ tableSchema = schemaFields.get(tableSchemaTag);`
Now, when I pass this 'tableSchema' to .withSchema(), it gives out this error and i know this is coz it accepts only TableSchema object. Is there any way around this?
incompatible types: com.google.cloud.dataflow.sdk.values.PCollection<com.google.api.services.bigquery.model.TableSchema> cannot be converted to com.google.api.services.bigquery.model.TableSchema