如何通过boto3客户端创建 Lakeformation 资源链接?

0

【以下的问题经过翻译处理】 如何通过Boto3客户端创建Lakeformation资源链接到数据库/表? 我已经使用glue_client.create_ database()函数创建了一个数据库。 现在,我需要创建一个指向该数据库的Lakeformation资源链接。请问有哪些方法可以支持?

profile picture
EXPERT
asked 6 months ago15 views
1 Answer
0

【以下的回答经过翻译处理】 基于此AWS CLI示例,您可以使用create_table()创建资源链接,只需填充TargetTable部分。 CLI详细内容见:https://docs.aws.amazon.com/lake-formation/latest/dg/create-resource-link-table.html

AWS CLI

aws glue create-table --database-name myissues --table-input '{"Name":"mycustomers","TargetTable":{"CatalogId":"111122223333","DatabaseName":"issues","Name":"customers"}}'

Boto3详细内容见: https://boto3.amazonaws.com/v1/documentation/api/latest/reference/services/glue/client/create_table.html

Boto3(仅限目标表部分,请参阅create_table()获取详细信息)

'TargetTable': {
            'CatalogId': '111122223333',
            'DatabaseName': 'issues',
            'Name': 'customers'
        }
profile picture
EXPERT
answered 6 months ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions