Query asset details
You can use natural language prompts with code agents such as Qoder and CodeX to batch query the custom attribute values of assets. You can also query the subject, directory description, and complete directory hierarchy for a single asset. This document describes the features, prerequisites, examples, and execution results of this capability. An appendix lists the required inputs.
Features
The comprehensive asset details query capability lets you use natural language prompts to assemble a complete, read-only asset profile. This capability covers two types of information. First, you can batch query the current values of custom attributes for a group of assets by their asset GUIDs, with an option to retrieve only specified attributes. Second, you can query the subject and directory to which a single asset is mounted and retrieve the complete directory hierarchy from root to leaf. This capability is commonly used for asset inventory, profile display, and read-back verification after writing attributes. All queries are read-only and do not modify the assets.
Use cases:
-
Retrieve the current custom attribute values for a batch of assets in a single request.
-
Query the subject or directory where an asset is mounted, along with its complete directory hierarchy path from root to leaf.
-
Validate attribute writes by reading back the values to confirm they have taken effect.
Limitations: When you batch query attribute values, each request supports a maximum of 50 asset GUIDs. If you exceed this limit, you must split the request into multiple batch queries. Querying a non-existent asset GUID does not return an error; the asset is simply omitted from the results. Check the results to verify the validity of the asset GUID. This capability performs read-only queries. To write attribute values, use the custom attribute management capability.
Prerequisites
-
You must have the required permissions to query assets.
-
You must have the asset GUID for the asset to be queried. If you only know a table or column name, you must first resolve it to a GUID.
Examples
Describe your requirements to the agent in natural language. You can copy and use the following sample prompts:
-
Query the custom attribute values for this batch of table assets.
-
Which subject and directory is this asset mounted in? Give me the full directory hierarchy path.
-
Query only the governance status and publishing description attributes for this batch of assets.
Interaction steps:
-
After you send a query prompt, the agent confirms the asset GUIDs to query and the specific attributes you requested.
-
If a query includes many assets, the agent splits it into batches of 50 or fewer asset GUIDs.
-
After executing the query, the agent organizes and returns the asset's attribute values or directory hierarchy information.
-
If a specific asset GUID is not returned in the results, the agent typically notifies you that the asset may not exist and asks you to verify it.
Execution results
The query returns the following results:
-
Returned content: An attribute query returns the attribute code and value for each custom attribute. A directory query returns the subject and directory where the asset is mounted, along with the complete directory hierarchy from root to leaf.
-
Completion status: The query is complete when the command returns successfully. A non-existent asset GUID does not cause an error and is omitted from the results.
-
Review and verification: You can check the results to confirm that they include the target asset GUID and its attribute values or directory information.
This capability is for read-only queries and does not modify any assets. The results reflect the data returned by the command.
Appendix: Inputs
The following table lists information items used for querying comprehensive asset details. This list is for reference only. In practice, the agent automatically identifies the required information from your prompt and asks for any missing details. You do not need to provide items marked as not required, as the system generates them automatically.
|
Parameter |
Required |
Description |
Example |
|
tenant ID |
Yes |
The ID of the target Dataphin tenant. It is a 19-digit number. |
1234567890123456789 |
|
asset GUID list |
Conditionally required |
An array of asset GUIDs for querying attribute values. The maximum is 50 per request. |
odps.tenant.project.table_name |
|
attribute code list |
No |
Specify the attribute codes you are interested in. If left blank, all custom attributes for the asset are returned. |
Governance Status, Publishing Description |
|
asset GUID |
Conditionally required |
A single asset GUID for querying the directory hierarchy. |
odps.tenant.project.table_name |
|
Include field information |
No |
Specifies whether to include field-level information in the directory query results. The default is No. |
No |
|
Include detailed attributes |
No |
Specifies whether to include detailed attributes in the directory query results. The default is No. |
No |