knowledge-catalog-discovery
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseUsage
使用说明
All scripts can be executed using Node.js. Replace and with actual values.
<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>\"}'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
参数
| Name | Type | Description | Required | Default |
|---|---|---|---|---|
| resources | array | Required. A list of up to 10 resource names. Resources may belong to different projects, but all must belong to the same location. | Yes |
| 名称 | 类型 | 描述 | 必填 | 默认值 |
|---|---|---|---|---|
| resources | array | 必填。最多包含10个资源名称的列表。资源可属于不同项目,但必须全部位于同一区域。 | 是 |
lookup_entry
lookup_entry
Retrieves a specific metadata regarding a data asset (e.g. table/dataset/view) from Catalog
从Catalog中检索特定数据资产(如表格/数据集/视图)的元数据。
Parameters
参数
| Name | Type | Description | Required | Default |
|---|---|---|---|---|
| entry | string | Required. The resource name of the Entry in the following form: projects/{project}/locations/{location}/entryGroups/{entryGroup}/entries/{entry}. | Yes | |
| view | integer |
## 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 | |
[]| 名称 | 类型 | 描述 | 必填 | 默认值 |
|---|---|---|---|---|
| entry | string | 必填。条目的资源名称,格式如下:projects/{project}/locations/{location}/entryGroups/{entryGroup}/entries/{entry}。 | 是 | |
| view | integer |
## 参数: 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
参数
| Name | Type | Description | Required | Default |
|---|---|---|---|---|
| query | string | The query against which aspect type should be matched. | Yes | |
| pageSize | integer | Number of returned aspect types in the search page. | No | |
| orderBy | string | Specifies the ordering of results. Supported values are: relevance, last_modified_timestamp, last_modified_timestamp asc | No | |
| 名称 | 类型 | 描述 | 必填 | 默认值 |
|---|---|---|---|---|
| query | string | 用于匹配维度类型的查询语句。 | 是 | |
| pageSize | integer | 搜索结果页中返回的维度类型数量。 | 否 | |
| orderBy | string | 指定结果的排序方式。支持的值包括:relevance、last_modified_timestamp、last_modified_timestamp asc | 否 | |
search_entries
search_entries
Searches for data assets (eg. table/dataset/view) in Catalog based on the provided search query.
根据提供的搜索查询在Catalog中搜索数据资产(如表格/数据集/视图)。
Parameters
参数
| Name | Type | Description | Required | Default |
|---|---|---|---|---|
| query | string | A 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 | |
| scope | string | A 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 | `` |
| pageSize | integer | Number of results in the search page. | No | |
| orderBy | string | Specifies the ordering of results. Supported values are: relevance, last_modified_timestamp, last_modified_timestamp asc | No | |
| 名称 | 类型 | 描述 | 必填 | 默认值 |
|---|---|---|---|---|
| query | string | 用于搜索条目的查询字符串,遵循Dataplex搜索语法。支持逻辑运算符(AND、OR、NOT)和分组。例如,要查找可能已重命名的表格,可以使用'type:table (name:books OR fiction)'。这比多次单独调用更高效。警告:执行无特定筛选条件的宽泛搜索(如type:table)可能会很慢并消耗大量资源。执行探索性搜索时,请务必使用pageSize参数限制返回结果的数量。 | 是 | |
| scope | string | 范围将搜索空间限制到特定项目或组织。格式必须为:organizations/<org_id> 或 projects/<project_id> 或 projects/<project_number>。 | 否 | `` |
| pageSize | integer | 搜索结果页中的结果数量。 | 否 | |
| orderBy | string | 指定结果的排序方式。支持的值包括:relevance、last_modified_timestamp、last_modified_timestamp asc | 否 | |