def test_model_bigqueryio(self): # We cannot test BigQueryIO functionality in unit tests, therefore we limit # ourselves to making sure the pipeline containing BigQuery sources and # sinks can be built. # # To run locally, set `run_locally` to `True`. You will also have to set # `project`, `dataset` and `table` to the BigQuery table the test will write # to. run_locally = False if run_locally: project = 'my-project' dataset = 'samples' # this must already exist table = 'model_bigqueryio' # this will be created if needed options = PipelineOptions().view_as(GoogleCloudOptions) options.project = project with beam.Pipeline(options=options) as p: snippets.model_bigqueryio(p, project, dataset, table) else: p = TestPipeline() snippets.model_bigqueryio(p)
def test_model_bigqueryio(self): # We cannot test BigQueryIO functionality in unit tests therefore we limit # ourselves to making sure the pipeline containing BigQuery sources and # sinks can be built. snippets.model_bigqueryio()