Code: Select all
Exception has occurred: AttributeError module 'apache_beam.io.gcp.internal.clients.bigquery' has no attribute 'TableReference'
Code: Select all
table_spec='ExporterPlayGround.TEST_STREAM'
with beam.Pipeline(options=pipeline_options) as p:
from apache_beam.io.gcp.internal.clients import bigquery
raw_stream = (
p | 'Start subscriber' >> beam.io.gcp.pubsub.ReadFromPubSub(subscription=subscription_name)
| 'Write to Table' >> beam.io.WriteToBigQuery(
table_spec,
schema='test_float:FLOAT, test2_float:FLOAT',
write_disposition=beam.io.BigQueryDisposition.WRITE_APPEND,
create_disposition=beam.io.BigQueryDisposition.CREATE_IF_NEEDED)
)