使用Apache Airflow在Google数据目录中创建分类时出错



专家

我正在尝试使用ApacheAirflow在谷歌数据目录中创建一个分类法。当我在Airflow中触发作业时,它会失败,并出现以下错误。

错误

> google.api_core.exceptions.PermissionDenied: 403 The caller does not have permission
rpc._channel._InactiveRpcError: <_InactiveRpcError of RPC that terminated with:
status = StatusCode.PERMISSION_DENIED
details = "The caller does not have permission"
debug_error_string = "{"created":"@1660850910.057899765","description":"Error received from peer ipv4:173.194.216.95:443","file":"src/core/lib/surface/call.cc","file_line":1074,"grpc_message":"The caller does not have permission","grpc_status":7}"

尽管它声明"权限被拒绝",但我可以使用ApacheAirflow操作符创建标记模板和标记。如果有人帮我解决实际问题,我将不胜感激。

代码

def sample_create_taxonomy():
client = datacatalog_v1.PolicyTagManagerClient()
request = datacatalog_v1.CreateTaxonomyRequest
(
parent='projects/sample-project-name/locations/us-central1',
)
response = client.create_taxonomy(request=request)
print(response)

根据数据目录文档,您需要对projects/sample-project-name/locations/us-central1拥有datacatalog.taxonomies.createIAM权限。

相关内容

  • 没有找到相关文章

最新更新