knowledge-catalog-discovery

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

Usage

使用说明

All scripts can be executed using Node.js. Replace
<param_name>
and
<param_value>
with actual values.
Bash:
node <skill_dir>/scripts/<script_name>.js '{"<param_name>": "<param_value>"}'
PowerShell:
node <skill_dir>/scripts/<script_name>.js '{\"<param_name>\": \"<param_value>\"}'
Note: The scripts automatically load the environment variables from various .env files. Do not ask the user to set vars unless skill executions fails due to env var absence.
所有脚本均可通过Node.js执行。将
<param_name>
<param_value>
替换为实际值。
Bash:
node <skill_dir>/scripts/<script_name>.js '{"<param_name>": "<param_value>"}'
PowerShell:
node <skill_dir>/scripts/<script_name>.js '{\"<param_name>\": \"<param_value>\"}'
注意:脚本会自动从多个.env文件加载环境变量。除非因缺少环境变量导致技能执行失败,否则不要要求用户设置变量。

Scripts

脚本

lookup_context

lookup_context

Retrieves rich metadata regarding one or more data assets along with their relationships.
检索一个或多个数据资产的丰富元数据及其关联关系。

Parameters

参数

NameTypeDescriptionRequiredDefault
resourcesarrayRequired. A list of up to 10 resource names. Resources may belong to different projects, but all must belong to the same location.Yes

名称类型描述必填默认值
resourcesarray必填。最多包含10个资源名称的列表。资源可属于不同项目,但必须全部位于同一区域。

lookup_entry

lookup_entry

Retrieves a specific metadata regarding a data asset (e.g. table/dataset/view) from Catalog
从Catalog中检索特定数据资产(如表格/数据集/视图)的元数据。

Parameters

参数

NameTypeDescriptionRequiredDefault
entrystringRequired. The resource name of the Entry in the following form: projects/{project}/locations/{location}/entryGroups/{entryGroup}/entries/{entry}.Yes
viewinteger
			## Argument: view

			**Type:** Integer

			**Description:** Optional. Specifies the parts of the entry and its aspects to return.

			**Possible Values:**

			*   1 (BASIC): Returns entry without aspects.
			*   2 (FULL): Return all required aspects and the keys of non-required aspects. (Default)
			*   3 (CUSTOM): Return the entry and aspects requested in aspect_types field (at most 100 aspects). Always use this view when aspect_types is not empty.
			*   4 (ALL): Return the entry and both required and optional aspects (at most 100 aspects)
			 | No | `2` |
| aspectTypes | array | Optional. Limits the aspects returned to the provided aspect types. It only works when used together with CUSTOM view. | No |
[]
|

名称类型描述必填默认值
entrystring必填。条目的资源名称,格式如下:projects/{project}/locations/{location}/entryGroups/{entryGroup}/entries/{entry}。
viewinteger
			## 参数: view

			**类型:** 整数

			**描述:** 可选。指定要返回的条目及其维度的部分内容。

			**可选值:**

			*   1 (BASIC): 返回不含维度的条目。
			*   2 (FULL): 返回所有必填维度以及非必填维度的键。(默认值)
			*   3 (CUSTOM): 返回条目以及aspect_types字段中请求的维度(最多100个维度)。当aspect_types不为空时,必须使用此视图。
			*   4 (ALL): 返回条目以及必填和可选维度(最多100个维度)
			 | 否 | `2` |
| aspectTypes | array | 可选。将返回的维度限制为提供的维度类型。仅与CUSTOM视图一起使用时生效。 | 否 |
[]
|

search_aspect_types

search_aspect_types

Search aspect types relevant to the query.
搜索与查询相关的维度类型。

Parameters

参数

NameTypeDescriptionRequiredDefault
querystringThe query against which aspect type should be matched.Yes
pageSizeintegerNumber of returned aspect types in the search page.No
5
orderBystringSpecifies the ordering of results. Supported values are: relevance, last_modified_timestamp, last_modified_timestamp ascNo
relevance

名称类型描述必填默认值
querystring用于匹配维度类型的查询语句。
pageSizeinteger搜索结果页中返回的维度类型数量。
5
orderBystring指定结果的排序方式。支持的值包括:relevance、last_modified_timestamp、last_modified_timestamp asc
relevance

search_entries

search_entries

Searches for data assets (eg. table/dataset/view) in Catalog based on the provided search query.
根据提供的搜索查询在Catalog中搜索数据资产(如表格/数据集/视图)。

Parameters

参数

NameTypeDescriptionRequiredDefault
querystringA query string for searching entries, following Dataplex search syntax. Supports logical operators (AND, OR, NOT) and grouping. For example, to find a table that might have been renamed, you could use 'type:table (name:books OR fiction)'. This can be more efficient than multiple separate calls.Warning: Performing broad searches without specific filters (e.g., type:table) can be slow and consume significant resources. When performing exploratory searches, always use the pageSize parameter to limit the number of results returned.Yes
scopestringA scope limits the search space to a particular project or organization. It must be in the format: organizations/<org_id> or projects/<project_id> or projects/<project_number>.No``
pageSizeintegerNumber of results in the search page.No
5
orderBystringSpecifies the ordering of results. Supported values are: relevance, last_modified_timestamp, last_modified_timestamp ascNo
relevance

名称类型描述必填默认值
querystring用于搜索条目的查询字符串,遵循Dataplex搜索语法。支持逻辑运算符(AND、OR、NOT)和分组。例如,要查找可能已重命名的表格,可以使用'type:table (name:books OR fiction)'。这比多次单独调用更高效。警告:执行无特定筛选条件的宽泛搜索(如type:table)可能会很慢并消耗大量资源。执行探索性搜索时,请务必使用pageSize参数限制返回结果的数量。
scopestring范围将搜索空间限制到特定项目或组织。格式必须为:organizations/<org_id> 或 projects/<project_id> 或 projects/<project_number>。``
pageSizeinteger搜索结果页中的结果数量。
5
orderBystring指定结果的排序方式。支持的值包括:relevance、last_modified_timestamp、last_modified_timestamp asc
relevance