我正在使用 MySQL 的 GCP 数据流到使用 python 的 CDC 的 GCS,我可以创建流但无法使用 datastream_v1alpha1 运行流

问题描述 投票:0回答:0

enter image description here

stream = datastream_v1alpha1.Stream(
    display_name='MySQL to gcs Stream',
    source_config = source_config,
    destination_config = destination_config,backfill_all=datastream_v1alpha1.Stream.BackfillAllStrategy(),
)

req=datastream_v1alpha1.CreateStreamRequest(parent=parent,stream_id=stream_id,stream=stream,force=True)

stream_response = client.create_stream(request=req)

operation = client.start_stream(name=stream.name)

---------------------------------------------------------------------------
AttributeError                            Traceback (most recent call last)
Input In [25], in <cell line: 1>()
----> 1 operation = client.start_stream(name=stream.name)

AttributeError: 'DatastreamClient' object has no attribute 'start_stream'


我在使用库 datastream_v1alpha1 时遇到此错误,datastream_v1alpha1 客户端中没有类似 start_stream 的函数。所以我尝试了不同的方法,将流状态更新为正在运行以启动和运行流,但这些方法不起作用。请帮我解决这个问题

google-cloud-platform data-migration google-datastream
© www.soinside.com 2019 - 2024. All rights reserved.