pabloem commented on a change in pull request #11040: [BEAM-9305] Allow value 
provider query strings in _CustomBigQuerySource
URL: https://github.com/apache/beam/pull/11040#discussion_r387847682
 
 

 ##########
 File path: sdks/python/apache_beam/io/gcp/bigquery_read_it_test.py
 ##########
 @@ -162,6 +163,15 @@ def test_iobase_source(self):
               query=self.query, use_standard_sql=True, project=self.project))
       assert_that(result, equal_to(self.TABLE_DATA))
 
+  @attr('IT')
+  def test_valueprovider_query_string(self):
+    query = StaticValueProvider(str, self.query)
+    with beam.Pipeline(argv=self.args) as p:
+      result = (
+          p | 'read' >> beam.io._ReadFromBigQuery(
+              query=query, use_standard_sql=True, project=self.project))
+      assert_that(result, equal_to(self.TABLE_DATA))
 
 Review comment:
   could you use the value provider in another one of the tests in this file? 
Since each test in this file takes ~5min to run, I'd prefer to avoid adding a 
new test.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

Reply via email to