如何在sin上设置“uniqueWriterIdentity=true”

2024-09-30 02:22:48 发布

您现在位置:Python中文网/ 问答频道 /正文

尝试使用日志记录Python SDK创建新接收器时出现以下错误:

google.gax.errors.RetryError: RetryError(Exception occurred in retry method that was not classified as transient, caused by <_Rendezvous of RPC that terminated with (StatusCode.INVALID_ARGUMENT, The destination project must be the same as the sink's project. Use uniqueWriterIdentity=true to allow cross project exports.)>)

我完全理解为什么会出现这个错误(我正在创建一个sink cross项目),但是我看不到在哪里可以设置uniqueWriterIdentity,如here所述。在

我错过了什么?在

sink = logging.Client(project=project_id).sink(
            'name',
            'resource.type:*',
            'bigquery.googleapis.com/projects/..')
sink.create() 

Tags: theprojectthatas错误google记录sdk

热门问题