GetSchema

Updated at:

Retrieves the details of a specified schema in Data Map. Only MaxCompute and Hologres schemas are supported.

Operation description

  1. DataWorks Basic Edition or a higher edition is required.

  2. Only MaxCompute and Hologres types are supported.

Try it now

Try this API in OpenAPI Explorer, no manual signing needed. Successful calls auto-generate SDK code matching your parameters. Download it with built-in credential security for local usage.

Test

RAM authorization

The table below describes the authorization required to call this API. You can define it in a Resource Access Management (RAM) policy. The table's columns are detailed below:

  • Action: The actions can be used in the Action element of RAM permission policy statements to grant permissions to perform the operation.

  • API: The API that you can call to perform the action.

  • Access level: The predefined level of access granted for each API. Valid values: create, list, get, update, and delete.

  • Resource type: The type of the resource that supports authorization to perform the action. It indicates if the action supports resource-level permission. The specified resource must be compatible with the action. Otherwise, the policy will be ineffective.

    • For APIs with resource-level permissions, required resource types are marked with an asterisk (*). Specify the corresponding Alibaba Cloud Resource Name (ARN) in the Resource element of the policy.

    • For APIs without resource-level permissions, it is shown as All Resources. Use an asterisk (*) in the Resource element of the policy.

  • Condition key: The condition keys defined by the service. The key allows for granular control, applying to either actions alone or actions associated with specific resources. In addition to service-specific condition keys, Alibaba Cloud provides a set of common condition keys applicable across all RAM-supported services.

  • Dependent action: The dependent actions required to run the action. To complete the action, the RAM user or the RAM role must have the permissions to perform all dependent actions.

Action

Access level

Resource type

Condition key

Dependent action

dataworks:GetSchema

get

*All Resource

*

None None

Request parameters

Parameter

Type

Required

Description

Example

Id

string

Yes

The ID. You can refer to the ListSchemas operation and Concepts related to metadata entities.

The format is ${EntityType}:${Instance ID or escaped URL}:${Catalog ID}:${Database name}:${Schema name}. Use empty strings as placeholders for missing levels.

Note

For the MaxCompute type, use an empty string as the placeholder for the instance ID level. The database name is the MaxCompute project name, and the project must have the three-level model enabled.

Examples:

maxcompute-schema:::project_name:schema_name (The three-level model is enabled for the MaxCompute project.)

holo-schema:instance_id::database_name:schema_name

Note

<br>instance_id: The Hologres instance ID<br> . database_name: The database name<br> . project_name: The MaxCompute project name<br> . schema_name: The schema name.

maxcompute-schema:::project_name:schema_name

Response elements

Element

Type

Description

Example

object

The response.

RequestId

string

The request ID.

A89B5D9D-74EA-XXXXXX

Success

boolean

Indicates whether the request was successful.

true

Schema Schema

The schema information.

Examples

Success response

JSON format

{
  "RequestId": "A89B5D9D-74EA-XXXXXX",
  "Success": true,
  "Schema": {
    "Id": "maxcompute-schema:123456XXX::test_project:default\nholo-schema:h-abc123xxx::test_db:test_schema",
    "Name": "test_db",
    "Comment": "test comment",
    "Type": "MANAGED",
    "ParentMetaEntityId": "maxcompute-project:123456XXX::test_project\nholo-database:h-abc123xxx::test_db",
    "CreateTime": 1736852168000,
    "ModifyTime": 1736852168000
  }
}

Error codes

See Error Codes for a complete list.

Release notes

See Release Notes for a complete list.