TheNeuralBit commented on code in PR #22616:
URL: https://github.com/apache/beam/pull/22616#discussion_r942836844


##########
sdks/python/apache_beam/dataframe/io.py:
##########
@@ -58,6 +58,17 @@
 _DEFAULT_BYTES_CHUNKSIZE = 1 << 20
 
 
+@frame_base.with_docs_from(pd)
+def read_gbq(table, *args, **kwargs):
+  """If you would like to use the 'DIRECT_READ' method ins ReadFromBigQuery,
+    please set use_bq_storage_api to True.
+    Otherwise, if you would like to use the 'EXPORT' method, please set
+    use_bq_storage_api to False, or leave it unspecified."""

Review Comment:
   From the perspective of the users of this API, the mode is fully controlled 
by the `use_bqstorage_api` parameter. It just confuses things to reveal that it 
maps to mode={DIRECT_READ, EXPORT} under the hood.
   
   If we want to reference the mode in the docstring, we should just have a 
`mode` parameter, and not bother with a `use_bqstorage_api` parameter. To be 
clear, I think that's an acceptable alternative, but I'd like to pick one or 
the other.
   
   I have a slight preference to avoid using Beam terminology though - a goal 
of the DataFrame API is to provide an API that feels natural to developers who 
are already familiar with pandas, and not familiar with Beam.



-- 
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.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to