I am trying to use run time parameters with BigtableIO in Apache Beam to write to BigTable.
I have created a pipeline to read from BigQuery and writing to Bigtable. The pipeline works fine when i provide static parameters (using ConfigBigtableIO and ConfigBigtableConfiguration, referring to example here - https://github.com/GoogleCloudPlatform/cloud-bigtable-examples/blob/master/java/dataflow-connector-examples/src/main/java/com/google/cloud/bigtable/dataflow/example/HelloWorldWrite.java) but I am getting a compile error while trying to setup the pipeline with run time parameters. The options is setup with all parameters being runtime Value Providers.
p.apply(BigQueryIO.readTableRows().fromQuery(options.getBqQuery())
.usingStandardSql())
.apply(ParDo.of(new TransFormFn(options.getColumnFamily(), options.getRowKey(), options.getColumnKey(), options.getRowKeySuffix())))
.apply(BigtableIO.write().withProjectId(options.getBigtableProjectId()).
withInstanceId(options.getBigtableInstanceId()).
withTableId(options.getBigtableTableId()));
It is expecting the output of Bigtable.write()... to be org.apache.beam.sdk.transforms.PTransform,OutputT> while Bigtable.write() is returning a Write object. Can you help with providing the correct syntax to fix this? Thanks.