| "Write to BigQuery" >> beam.io.WriteToBigQuery(
^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\x\Python\Python311\Lib\site-packages\apache_beam\io\gcp\bigquery.py", line 2083, in __init__
self.table_reference = bigquery_tools.parse_table_reference(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File File "C:\x\Python\Python311\Lib\site-packages\apache_beam\io\gcp\bigquery_tools.py", line 263, in parse_table_reference
if isinstance(table, TableReference):
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
TypeError: isinstance() arg 2 must be a type, a tuple of types, or a union
Среда:
- Версия Python: 3.11
- Версия Apache Beam: 2.57.0
- версия google-cloud-bigquery: 3.26.0
- Раннер: DirectRunner (для локального тестирования)
Я проверил совместимость моих версий на основе установочного файла из репозитория Apache Beam GitHub (google-cloud-bigquery >=2.0.0,> beam.Create([None])
| "Read from Cloud SQL" >> beam.ParDo(ReadFromCloudSQL())
| "Print results" >> beam.Map(print) # Print each element to the console
| "Write to BigQuery" >> beam.io.WriteToBigQuery(
table=table_id,
schema=table_schema,
create_disposition=beam.io.BigQueryDisposition.CREATE_NEVER,
write_disposition=beam.io.gcp.bigquery.BigQueryDisposition.WRITE_APPEND
)
)
Подробнее здесь: https://stackoverflow.com/questions/790 ... -union-whi