kamilwu 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_r391760791
##########
File path: sdks/python/apache_beam/io/gcp/bigquery.py
##########
@@ -694,14 +699,16 @@ def read(self, range_tracker):
raise NotImplementedError('BigQuery source must be split before being
read')
def _setup_temporary_dataset(self, bq):
+ query = self.evaluate_query_valueprovider()
Review comment:
There's a `check_accessible` decorator that could be used for this function
(as well as for `estimate_size`).
I think you could also test if `self.query` is a ValueProvider or not in the
constructor. If it's not, you can then create a StaticValueProvider object.
`self.evaluate_query_valueprovider()` would be unnecessary.
Here'a en example:
https://github.com/apache/beam/blob/f75838f306fc1d851b0dea11c2cb861b43430568/sdks/python/apache_beam/io/filebasedsource.py#L115-L117
----------------------------------------------------------------
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