您可以使用 Knowledge Catalog 搜尋及管理 Datastream 資源。這個平台可儲存、管理及存取中繼資料。您可以使用 Knowledge Catalog 執行下列操作:
- 探索、分析及瞭解 Datastream 中繼資料。
- 瀏覽 Datastream 資源,例如串流、連線設定檔和連線設定。
- 提升營運可視性,方便排解問題及管理資料管道。
- 建立近乎即時和週期性機制,透過即時和批次同步處理,持續擷取中繼資料。詳情請參閱同步模式。
Knowledge Catalog 建模
Datastream 資源會以預留的 Knowledge Catalog 專屬項目群組和特定項目類型,在 Knowledge Catalog 中建立模型。
| 知識目錄實體 | 資源 ID |
|---|---|
| 項目群組 | @datastream |
| 項目類型 | datastream-stream |
| 項目類型 | datastream-connection-profile |
| 項目類型 | datastream-private-connection |
中繼資料探索類型
Knowledge Catalog 中繼資料探索是自動化程序,會掃描已連線的資料來源 (例如 Datastream),找出資料資產並將技術中繼資料擷取到 Knowledge Catalog。
這個程序會使用即時和定期同步功能,確保目錄與來源系統保持一致。對於 Datastream,系統預設會探索所有串流、連線設定檔和私人連線設定的中繼資料:
| 資源類型 | 已擷取中繼資料 |
|---|---|
| 串流 |
|
| 連線設定檔 |
|
| 私人連線設定 |
|
同步模式
Datastream 會使用下列同步模式,確保知識目錄與來源系統保持一致。
- 即時同步:在這個模式中,每當發生任何中繼資料變更,Datastream 就會將事件發布至 Pub/Sub 主題。這樣一來,知識目錄就能訂閱這些主題,近乎即時地接收更新。
- 批次同步:在此模式下,Datastream 會定期將完整的中繼資料匯出內容 (檢查點) 發布至指定的 Cloud Storage bucket,Knowledge Catalog 則會從中擷取資料。
關鍵字和自然語言搜尋
Knowledge Catalog 支援關鍵字和自然語言搜尋。
- 您可以使用特定關鍵字、篩選條件和定義的語法,透過關鍵字搜尋尋找資源。舉例來說,您可以輸入
system=Datastream AND type=Stream,查看所有 Datastream 串流。 - 自然語言搜尋 (搶先版) 會運用 AI 理解語意查詢,您可以使用日常用語尋找資源,不必再使用複雜的語法。例如,你可以輸入
List all Datastream streams with BigQuery destination等查詢。
詳情請參閱「知識目錄的搜尋語法」。
事前準備
- 登入 Google Cloud 帳戶。如果您是 Google Cloud新手,歡迎 建立帳戶,親自評估產品在實際工作環境中的成效。新客戶還能獲得價值 $300 美元的免費抵免額,可用於執行、測試及部署工作負載。
-
In the Google Cloud console, on the project selector page, select or create a Google Cloud project.
Roles required to select or create a project
- Select a project: Selecting a project doesn't require a specific IAM role—you can select any project that you've been granted a role on.
-
Create a project: To create a project, you need the Project Creator role
(
roles/resourcemanager.projectCreator), which contains theresourcemanager.projects.createpermission. Learn how to grant roles.
-
Verify that billing is enabled for your Google Cloud project.
-
In the Google Cloud console, on the project selector page, select or create a Google Cloud project.
Roles required to select or create a project
- Select a project: Selecting a project doesn't require a specific IAM role—you can select any project that you've been granted a role on.
-
Create a project: To create a project, you need the Project Creator role
(
roles/resourcemanager.projectCreator), which contains theresourcemanager.projects.createpermission. Learn how to grant roles.
-
Verify that billing is enabled for your Google Cloud project.
-
為專案啟用 Dataplex API。
- 確認您具備必要權限。
必要的 IAM 角色
本節說明搜尋資源及存取搜尋結果所需的角色和權限。
存取搜尋結果所需的角色
如要在 Knowledge Catalog 中搜尋及查看 Datastream 中繼資料,主體必須具備查看 Datastream 資源的權限,包括 dataplex.projects.search 權限。
如要將這些權限授予主體 (例如使用者、群組或服務帳戶),請在包含 Datastream 資源的專案中,指派 Datastream 檢視者 (roles/datastream.viewer) IAM 角色。
| Knowledge Catalog 作業 | Datastream 資源 | 所需角色或權限 |
|---|---|---|
| 搜尋 Datastream 資源 | 串流 | datastream.streams.get |
| 連線設定檔 | datastream.connectionProfiles.get |
|
| 私人連線設定 | datastream.privateConnections.get |
如要進一步瞭解如何授予角色,請參閱「管理存取權」。如要進一步瞭解 Datastream IAM 角色,請參閱「Datastream 的 IAM 角色和權限」。
搜尋記錄所需的角色
如要在專案搜尋項目,至少須具備該項專案的其中一個 IAM 角色:
- Dataplex Catalog 管理員
(
roles/dataplex.catalogAdmin) - Dataplex Catalog 編輯者 (
roles/dataplex.catalogEditor) - Dataplex Catalog 檢視者 (
roles/dataplex.catalogViewer)
系統會獨立檢查搜尋結果的權限,與所選專案無關。 詳情請參閱「使用 Knowledge Catalog 搜尋資料資產」。
搜尋 Datastream 資產
在 Google Cloud 控制台中使用知識目錄搜尋頁面,搜尋 Datastream 資產。
前往 Knowledge Catalog 的「Search」(搜尋) 頁面。
在「選擇搜尋平台」中,選取「Knowledge Catalog」。
在「篩選器」面板中,按一下「系統」,然後選取「Datastream」。
選用。在「型別別名」中,選取一或多個下列型別別名,即可將搜尋結果篩選為特定類型的 Datastream 資產:
- 資料串流:搜尋 Datastream 串流。
- 連線設定檔:搜尋 Datastream 連線設定檔。
- 連線:搜尋 Datastream 私人連線設定。
使用查詢執行關鍵字搜尋
您可以使用知識目錄中的搜尋欄位執行關鍵字搜尋查詢。舉例來說,您可以輸入 system=Datastream AND type=Stream 查看所有資料串流。
詳情請參閱「知識目錄的搜尋語法」。
如要查看所有 Datastream 資產,請輸入 system=Datastream。
然後輸入特定關鍵字。舉例來說,如要查看所有 Datastream 串流:
system=Datastream AND type=Stream
如要查看所有連線設定檔,請輸入下列查詢:
system=Datastream AND type=ConnectionProfile
您也可以使用括號和邏輯運算子 AND 和 OR,建立複雜的運算式。如要進一步瞭解可在搜尋欄位中使用的運算式,請參閱「知識目錄的搜尋語法」。
您可以直接在搜尋欄位中輸入特定 Datastream 資產的搜尋查詢。查詢字串的格式如下:
type="projects/dataplex-types/locations/global/entryTypes/QUERY_STRING"
更改下列內容:
QUERY_STRING:根據要查詢的 Datastream 資產類型,使用下列清單找出查詢字串:datastream-streamdatastream-connection-profiledatastream-private-connection
查詢範例如下:
type="projects/dataplex-types/locations/global/entryTypes/datastream-stream"
定價
在 Knowledge Catalog 中儲存 Datastream 技術中繼資料不需付費。API 呼叫和額外的業務中繼資料擴充功能,將以標準 Knowledge Catalog 價格計費。詳情請參閱 Knowledge Catalog 定價頁面。