Catalog - Preview Table
Retrieves a preview set of rows in given table.
GET https://{accountName}.{adlaCatalogDnsSuffix}/catalog/usql/databases/{databaseName}/schemas/{schemaName}/tables/{tableName}/previewrows?api-version=2016-11-01
GET https://{accountName}.{adlaCatalogDnsSuffix}/catalog/usql/databases/{databaseName}/schemas/{schemaName}/tables/{tableName}/previewrows?maxRows={maxRows}&maxColumns={maxColumns}&api-version=2016-11-01
URI Parameters
| Name | In | Required | Type | Description |
|---|---|---|---|---|
|
account
|
path | True |
string |
The Azure Data Lake Analytics account upon which to execute catalog operations. |
|
adla
|
path | True |
string |
Gets the DNS suffix used as the base for all Azure Data Lake Analytics Catalog service requests. |
|
database
|
path | True |
string |
The name of the database containing the table. |
|
schema
|
path | True |
string |
The name of the schema containing the table. |
|
table
|
path | True |
string |
The name of the table. |
|
api-version
|
query | True |
string |
Client Api Version. |
|
max
|
query |
integer (int64) |
The maximum number of columns to be retrieved. |
|
|
max
|
query |
integer (int64) |
The maximum number of preview rows to be retrieved. Rows returned may be less than or equal to this number depending on row sizes and number of rows in the table. |
Responses
| Name | Type | Description |
|---|---|---|
| 200 OK |
Successfully retrieved preview rows for the specified table. |
Examples
Retrieves a preview set of rows in given table
Sample request
GET https://contosoadla.azuredatalakeanalytics.net/catalog/usql/databases/master/schemas/dbo/tables/test_table_name/previewrows?api-version=2016-11-01
Sample response
{
"totalRowCount": 1,
"totalColumnCount": 2,
"rows": [
[
"value_a",
"value_b"
]
],
"truncated": false,
"schema": [
{
"name": "test_column_name",
"type": "test_data_type"
}
]
}
Definitions
| Name | Description |
|---|---|
|
USql |
A Data Lake Analytics catalog U-SQL table column item. |
|
USql |
A Data Lake Analytics catalog table or partition preview rows item. |
USqlTableColumn
A Data Lake Analytics catalog U-SQL table column item.
| Name | Type | Description |
|---|---|---|
| name |
string |
the name of the column in the table. |
| type |
string |
the object type of the specified column (such as System.String). |
USqlTablePreview
A Data Lake Analytics catalog table or partition preview rows item.
| Name | Type | Description |
|---|---|---|
| rows |
string[] |
the rows of the table or partition preview, where each row is an array of string representations the row's values. Note: Byte arrays will appear as base-64 encoded values, SqlMap and SqlArray objects will appear as escaped JSON objects, and DateTime objects will appear as ISO formatted UTC date-times. |
| schema |
the schema of the table or partition. |
|
| totalColumnCount |
integer (int64) |
the total number of columns in the table or partition. |
| totalRowCount |
integer (int64) |
the total number of rows in the table or partition. |
| truncated |
boolean |
true if the amount of data in the response is less than expected due to the preview operation's size limitations. This can occur if the requested rows or row counts are too large. |