本文為英文版的機器翻譯版本,如內容有任何歧義或不一致之處,概以英文版為準。
的業務詞彙表 AWS Glue Data Catalog
注意
商業內容和語意搜尋為 預覽版 AWS Glue ,可能會有所變更。
商業詞彙表是用於控制詞彙的容器,可定義組織內的商業概念。將詞彙表術語與 Data Catalog 資產建立關聯,使其具有商業意義,並透過語意搜尋提高可探索性。
建立詞彙表
使用 CreateGlossary建立商業詞彙表。
aws glue create-glossary \ --name "Finance Data Definitions" \ --description "Standardized financial terms used across reporting and analytics"
輸出範例:
{ "Id": "gl-c9vq7sh2fk4t2h", "Name": "Finance Data Definitions" }
建立詞彙表詞彙
使用 CreateGlossaryTerm將詞彙新增至詞彙表。
aws glue create-glossary-term \ --glossary-identifierglossary-id\ --name "Active User" \ --short-description "A user with at least one login in the last 30 days" \ --long-description "An account that has logged in at least once within the trailing 30-day window. Used as the standard engagement metric across all product teams."
輸出範例:
{ "Id": "gt-d7xm3np5rk2w9j", "GlossaryId": "gl-c9vq7sh2fk4t2h", "Name": "Active User" }
將詞彙表術語與資產建立關聯
使用 AssociateGlossaryTerms將術語與 Data Catalog 資產建立關聯。
注意
在預覽期間,每個資產最多可以關聯 10 個詞彙表詞彙。
aws glue associate-glossary-terms \ --identifierasset-id\ --glossary-term-identifiers '["term-id-1", "term-id-2"]'
輸出範例:
{ "Identifier": "c2fymbu18rtsx5", "GlossaryTerms": [ {"Id": "gt-d7xm3np5rk2w9j", "Name": "Active User"}, {"Id": "gt-h4kp9wt6mq3v2n", "Name": "PII"} ] }
移除詞彙表詞彙關聯
使用 從資產DisassociateGlossaryTerms中移除詞彙關聯。
aws glue disassociate-glossary-terms \ --identifierasset-id\ --glossary-term-identifiers '["term-id"]'
更新詞彙表和術語
更新會立即生效,並反映在搜尋結果中。
更新詞彙表
使用 UpdateGlossary:
aws glue update-glossary \ --identifierglossary-id\ --name "Enterprise Finance Glossary" \ --description "Updated standardized financial terms for enterprise reporting"
更新詞彙表字詞
使用 UpdateGlossaryTerm:
aws glue update-glossary-term \ --identifierterm-id\ --name "Monthly Active User" \ --short-description "A user with at least one login in the last 30 days"
刪除詞彙表和術語
您必須從詞彙表刪除所有詞彙,才能刪除詞彙表。
刪除詞彙表字詞
使用 DeleteGlossaryTerm:
aws glue delete-glossary-term \ --identifierterm-id
刪除詞彙表
在移除所有詞彙DeleteGlossary後使用 :
aws glue delete-glossary \ --identifierglossary-id
列出詞彙表和術語
ListGlossaries 和 都ListGlossaryTerms支援使用 MaxResults和 進行分頁NextToken。
列出所有詞彙表
執行以下命令:
aws glue list-glossaries \ --max-results 10
輸出範例:
{ "Items": [ {"Id": "gl-c9vq7sh2fk4t2h", "Name": "Finance Data Definitions"}, {"Id": "gl-f8yn2bx7jl5r4k", "Name": "Marketing Glossary"} ] }
在詞彙表中列出詞彙
執行以下命令:
aws glue list-glossary-terms \ --glossary-identifierglossary-id\ --max-results 10
輸出範例:
{ "GlossaryId": "gl-c9vq7sh2fk4t2h", "Items": [ {"Id": "gt-d7xm3np5rk2w9j", "Name": "Active User"}, {"Id": "gt-j6rm4xv9np8w3t", "Name": "EBITDA"} ] }
擷取詞彙表和術語詳細資訊
擷取詞彙表
執行以下命令:
aws glue get-glossary \ --identifierglossary-id
擷取詞彙表字詞
執行以下命令:
aws glue get-glossary-term \ --identifierterm-id