Previewing Table Data
Function
This API is used to preview table data.
Calling Method
For details, see Calling APIs.
URI
GET /v3/{project_id}/asset/entities/guid/{guid}/preview
|
Parameter |
Mandatory |
Type |
Description |
|---|---|---|---|
|
project_id |
Yes |
String |
Project ID. For details about how to obtain the project ID, see Project ID and Account ID. |
|
guid |
Yes |
String |
Asset GUID. For details about how to obtain the asset GUID, see Data Development Job ID. |
|
Parameter |
Mandatory |
Type |
Description |
|---|---|---|---|
|
data_connection_id |
No |
String |
Data connection ID |
|
data_type |
No |
String |
Data source table type. The options are as follows: hive_table, dws_table, dli_table, dli_table_managed, dli_table_external, dli_table_view, mysql_table, gbase_table, postgre_table, hbase_table, dm_table, doris_table, and sqlserver_table. |
|
database |
No |
String |
Database name |
|
schema |
No |
String |
Schema name |
|
table |
No |
String |
Table name |
|
datasource_workspace_id |
No |
String |
Data source workspace ID |
|
partitions_condition |
No |
String |
Partition name. For the Hive data source, data in the previewed partition can be used. |
Request Parameters
|
Parameter |
Mandatory |
Type |
Description |
|---|---|---|---|
|
X-Auth-Token |
Yes |
String |
User token. This parameter is mandatory when token authentication is used. You can obtain it from the value of X-Subject-Token in the response message header returned by the "Obtaining a User Token" API of the IAM service. |
|
workspace |
Yes |
String |
Workspace ID. For details about how to obtain the workspace ID, see Instance ID and Workspace ID. |
Response Parameters
Status code: 200
|
Parameter |
Type |
Description |
|---|---|---|
|
rows |
Array<Array<Object>> |
Data list in the table |
|
schema |
Array of objects |
Field information list |
Status code: 400
|
Parameter |
Type |
Description |
|---|---|---|
|
error_code |
String |
Error code. |
|
error_msg |
String |
Error description. |
Status code: 401
|
Parameter |
Type |
Description |
|---|---|---|
|
error_code |
String |
Error code. |
|
error_msg |
String |
Error description. |
Status code: 403
|
Parameter |
Type |
Description |
|---|---|---|
|
error_code |
String |
Error code. |
|
error_msg |
String |
Error description. |
Status code: 404
|
Parameter |
Type |
Description |
|---|---|---|
|
error_code |
String |
Error code. |
|
error_msg |
String |
Error description. |
Example Requests
None
Example Responses
Status code: 200
OK
{
"rows" : null,
"schema" : [ {
"name" : "string"
}, {
"school" : "string"
}, {
"id" : "int"
}, {
"address" : "string"
} ]
}
Status Codes
|
Status Code |
Description |
|---|---|
|
200 |
OK |
|
400 |
BadRequest |
|
401 |
Unauthorized |
|
403 |
Forbidden |
|
404 |
Not Found |
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.