We have some dataflow job which finally writes the result into BigQueryIO.
We want to write unit tests for the dataflow job. We are able to write unit tests for all the PTransforms and DoDn used in the job. But we have to have unit test for the pipeline or for the job itself. But we don't want to write something in BigQuery during unittests.
How can we mock the BigQueryIO?
We are writing the results into BigQuery using the below code.
.apply(BigQueryIO.Write
.to("my_bigquery_table")
.withSchema(getSchema())
.withWriteDisposition(
BigQueryIO.Write.WriteDisposition.WRITE_TRUNCATE));
Aucun commentaire:
Enregistrer un commentaire