|
| 1 | +--- |
| 2 | +name: knowledge-catalog-discovery |
| 3 | +description: Use these skills when you need to discover and explore data assets in the Knowledge Catalog. It allows you to search for entries, lookup specific metadata, and explore aspect types to understand your data platform's assets. |
| 4 | +--- |
| 5 | + |
| 6 | +## Usage |
| 7 | + |
| 8 | +All scripts can be executed using Node.js. Replace `<param_name>` and `<param_value>` with actual values. |
| 9 | + |
| 10 | +**Bash:** |
| 11 | +`node <skill_dir>/scripts/<script_name>.js '{"<param_name>": "<param_value>"}'` |
| 12 | + |
| 13 | +**PowerShell:** |
| 14 | +`node <skill_dir>/scripts/<script_name>.js '{\"<param_name>\": \"<param_value>\"}'` |
| 15 | + |
| 16 | +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. |
| 17 | + |
| 18 | + |
| 19 | +## Scripts |
| 20 | + |
| 21 | + |
| 22 | +### lookup_context |
| 23 | + |
| 24 | +Retrieves rich metadata regarding one or more data assets along with their relationships. |
| 25 | + |
| 26 | +#### Parameters |
| 27 | + |
| 28 | +| Name | Type | Description | Required | Default | |
| 29 | +| :--- | :--- | :--- | :--- | :--- | |
| 30 | +| 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 | | |
| 31 | + |
| 32 | + |
| 33 | +--- |
| 34 | + |
| 35 | +### lookup_entry |
| 36 | + |
| 37 | +Retrieves a specific metadata regarding a data asset (e.g. table/dataset/view) from Catalog |
| 38 | + |
| 39 | +#### Parameters |
| 40 | + |
| 41 | +| Name | Type | Description | Required | Default | |
| 42 | +| :--- | :--- | :--- | :--- | :--- | |
| 43 | +| entry | string | Required. The resource name of the Entry in the following form: projects/{project}/locations/{location}/entryGroups/{entryGroup}/entries/{entry}. | Yes | | |
| 44 | +| view | integer | |
| 45 | + ## Argument: view |
| 46 | + |
| 47 | + **Type:** Integer |
| 48 | + |
| 49 | + **Description:** Optional. Specifies the parts of the entry and its aspects to return. |
| 50 | + |
| 51 | + **Possible Values:** |
| 52 | + |
| 53 | + * 1 (BASIC): Returns entry without aspects. |
| 54 | + * 2 (FULL): Return all required aspects and the keys of non-required aspects. (Default) |
| 55 | + * 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. |
| 56 | + * 4 (ALL): Return the entry and both required and optional aspects (at most 100 aspects) |
| 57 | + | No | `2` | |
| 58 | +| aspectTypes | array | Optional. Limits the aspects returned to the provided aspect types. It only works when used together with CUSTOM view. | No | `[]` | |
| 59 | + |
| 60 | + |
| 61 | +--- |
| 62 | + |
| 63 | +### search_aspect_types |
| 64 | + |
| 65 | +Search aspect types relevant to the query. |
| 66 | + |
| 67 | +#### Parameters |
| 68 | + |
| 69 | +| Name | Type | Description | Required | Default | |
| 70 | +| :--- | :--- | :--- | :--- | :--- | |
| 71 | +| query | string | The query against which aspect type should be matched. | Yes | | |
| 72 | +| pageSize | integer | Number of returned aspect types in the search page. | No | `5` | |
| 73 | +| orderBy | string | Specifies the ordering of results. Supported values are: relevance, last_modified_timestamp, last_modified_timestamp asc | No | `relevance` | |
| 74 | + |
| 75 | + |
| 76 | +--- |
| 77 | + |
| 78 | +### search_entries |
| 79 | + |
| 80 | +Searches for data assets (eg. table/dataset/view) in Catalog based on the provided search query. |
| 81 | + |
| 82 | +#### Parameters |
| 83 | + |
| 84 | +| Name | Type | Description | Required | Default | |
| 85 | +| :--- | :--- | :--- | :--- | :--- | |
| 86 | +| 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 | | |
| 87 | +| 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 | `` | |
| 88 | +| pageSize | integer | Number of results in the search page. | No | `5` | |
| 89 | +| orderBy | string | Specifies the ordering of results. Supported values are: relevance, last_modified_timestamp, last_modified_timestamp asc | No | `relevance` | |
| 90 | + |
| 91 | + |
| 92 | +--- |
| 93 | + |
0 commit comments