TheNeuralBit commented on issue #23760: URL: https://github.com/apache/beam/issues/23760#issuecomment-1286252080
### What went wrong? The issue here is that we were accessing the `apache_beam.io.gcp.bigquery_schema_tools` package through the overall `beam` import (i.e. accessing `import beam; beam.io.gcp.bigquery_schema_tools`), rather than importing it directly as we typically do (i.e. `from apache_beam.io.gcp import bigquery_schema_tools`) . Unfortunately it seems the bigquery_schema_tools package is not defined until it is imported specifically _somewhere_ in the program. So if we try to access `beam.io.gcp.bigquery_schema_tools` before that point, you'll get an error. ### Why didn't tests catch this? We do have tests for this in [apache_beam.dataframe.io_it_test]( https://github.com/apache/beam/blob/master/sdks/python/apache_beam/dataframe/io_it_test.py). I'm not quite sure why they didn't catch this - presumably the package is imported somewhere else in the course of running tests, either in another test, or during discovery. So the attribute access works in that context. -- 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]
