Catalog - Preview Table Partition

Retrieves a preview set of rows in given partition.

GET https://{accountName}.{adlaCatalogDnsSuffix}/catalog/usql/databases/{databaseName}/schemas/{schemaName}/tables/{tableName}/partitions/{partitionName}/previewrows?api-version=2016-11-01
GET https://{accountName}.{adlaCatalogDnsSuffix}/catalog/usql/databases/{databaseName}/schemas/{schemaName}/tables/{tableName}/partitions/{partitionName}/previewrows?maxRows={maxRows}&maxColumns={maxColumns}&api-version=2016-11-01

URI Parameters

Name In Required Type Description
accountName
path True

string

The Azure Data Lake Analytics account upon which to execute catalog operations.

adlaCatalogDnsSuffix
path True

string

Gets the DNS suffix used as the base for all Azure Data Lake Analytics Catalog service requests.

databaseName
path True

string

The name of the database containing the partition.

partitionName
path True

string

The name of the table partition.

schemaName
path True

string

The name of the schema containing the partition.

tableName
path True

string

The name of the table containing the partition.

api-version
query True

string

Client Api Version.

maxColumns
query

integer (int64)

The maximum number of columns to be retrieved.

maxRows
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 partition.

Responses

Name Type Description
200 OK

USqlTablePreview

Successfully retrieved preview rows for the specified partition.

Examples

Retrieves a preview set of rows in given partition

Sample request

GET https://contosoadla.azuredatalakeanalytics.net/catalog/usql/databases/master/schemas/dbo/tables/test_table_name/partitions/test_partition_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
USqlTableColumn

A Data Lake Analytics catalog U-SQL table column item.

USqlTablePreview

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

USqlTableColumn[]

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.