Retrieves the currently effective data semantics of an agent.
Try it now
Test
RAM authorization
|
Action |
Access level |
Resource type |
Condition key |
Dependent action |
|
eventbridge:GetAgentDataSemantics |
get |
*All Resource
|
None | None |
Request parameters
|
Parameter |
Type |
Required |
Description |
Example |
| AgentName |
string |
Yes |
The name of the agent. |
bakehouse_agent |
Response elements
|
Element |
Type |
Description |
Example |
|
object |
|||
| Message |
string |
The response message. If the request fails, an error message is returned. |
Data semantics not found. |
| RequestId |
string |
The unique identifier generated by Alibaba Cloud for the request. |
5DAF96FB-A4DF-548C-B8A1-F2A8D2F4**** |
| Data |
object |
The details of the currently effective version of data semantics. If the generation is running, fails, or is completed but not saved, only the official version is returned, and the temporary snapshot is not returned. |
|
| VersionNo |
integer |
The currently effective version number. |
3 |
| Metrics |
array |
The SQL expression knowledge. Up to 100 items are supported. |
|
| AgentDataSemanticsMetric |
The SQL expression knowledge item. |
||
| Joins |
array |
The data join knowledge. Up to 100 items are supported. |
|
| AgentDataSemanticsJoin |
The data join knowledge item. |
||
| Examples |
array |
The SQL example knowledge. Up to 50 items are supported. |
|
| AgentDataSemanticsExample |
The SQL example knowledge item. |
||
| Text | AgentDataSemanticsText |
The text knowledge in Markdown format. |
|
| Code |
string |
The response code. |
Success |
| Success |
boolean |
Indicates whether the request was successful. |
true |
Examples
Success response
JSON format
{
"Message": "Data semantics not found.",
"RequestId": "5DAF96FB-A4DF-548C-B8A1-F2A8D2F4****",
"Data": {
"VersionNo": 3,
"Metrics": [
{
"Name": "TotalSales",
"Type": "measure",
"SQLExpression": "SUM(sales_transactions.totalPrice)",
"Synonyms": [
"Sales"
],
"Description": "Use totalPrice to calculate total sales for sales performance comparison"
}
],
"Joins": [
{
"LeftTable": "samples.bakehouse.sales_transactions",
"RightTable": "samples.bakehouse.customers",
"Condition": {
"Mode": "form",
"LeftColumn": "customerID",
"RightColumn": "customerID",
"SQLExpression": "sales_transactions.customerID = customers.customerID"
},
"RelationshipType": "many_to_one",
"Description": "Use this join when analyzing customer attributes associated with sales transactions"
}
],
"Examples": [
{
"Name": "High-value customers with weekly sales exceeding 150",
"SQLExpression": "SELECT customerID FROM sales_transactions",
"Parameters": [
{
"Name": "start_date",
"DataType": "date",
"Value": "2025-01-01",
"Description": "The lower bound of the transaction date"
}
],
"Description": "Use this example when a user asks about high-value customers based on weekly statistics"
}
],
"Text": {
"Content": "## Data description"
}
},
"Code": "Success",
"Success": true
}
Error codes
|
HTTP status code |
Error code |
Error message |
Description |
|---|---|---|---|
| 500 | InternalError | Internal Server Error | |
| 403 | ServiceNotEnable | Service not enable | |
| 403 | EventHouseServiceNotEnable | EventHouse service not enable | |
| 404 | AgentNotFound | Agent not found. | |
| 404 | DataSemanticsNotFound | Data semantics not found. |
See Error Codes for a complete list.
Release notes
See Release Notes for a complete list.