Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[ADLA] - Support table preview #3013

Merged
merged 1 commit into from
May 8, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -1676,6 +1676,77 @@
"x-ms-odata": "#/definitions/USqlTableStatistics"
}
},
"/catalog/usql/databases/{databaseName}/schemas/{schemaName}/tables/{tableName}/partitions/{partitionName}/previewrows": {
"get": {
"tags": [
"Catalog"
],
"operationId": "Catalog_PreviewTablePartition",
"description": "Retrieves a preview set of rows in given partition.",
"parameters": [
{
"name": "databaseName",
"in": "path",
"required": true,
"type": "string",
"description": "The name of the database containing the partition."
},
{
"name": "schemaName",
"in": "path",
"required": true,
"type": "string",
"description": "The name of the schema containing the partition."
},
{
"name": "tableName",
"in": "path",
"required": true,
"type": "string",
"description": "The name of the table containing the partition."
},
{
"name": "partitionName",
"in": "path",
"required": true,
"type": "string",
"description": "The name of the table partition."
},
{
"name": "maxRows",
"in": "query",
"required": false,
"type": "integer",
"format": "int64",
"description": "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."
},
{
"name": "maxColumns",
"in": "query",
"required": false,
"type": "integer",
"format": "int64",
"description": "The maximum number of columns to be retrieved."
},
{
"$ref": "#/parameters/ApiVersionParameter"
}
],
"responses": {
"200": {
"description": "Successfully retrieved preview rows for the specified partition.",
"schema": {
"$ref": "#/definitions/USqlTablePreview"
}
}
},
"x-ms-examples": {
"Retrieves a preview set of rows in given partition": {
"$ref": "./examples/Catalog_PreviewTablePartition.json"
}
}
}
},
"/catalog/usql/databases/{databaseName}/schemas/{schemaName}/tables/{tableName}/partitions/{partitionName}": {
"get": {
"tags": [
Expand Down Expand Up @@ -1731,6 +1802,70 @@
}
}
},
"/catalog/usql/databases/{databaseName}/schemas/{schemaName}/tables/{tableName}/previewrows": {
"get": {
"tags": [
"Catalog"
],
"operationId": "Catalog_PreviewTable",
"description": "Retrieves a preview set of rows in given table.",
"parameters": [
{
"name": "databaseName",
"in": "path",
"required": true,
"type": "string",
"description": "The name of the database containing the table."
},
{
"name": "schemaName",
"in": "path",
"required": true,
"type": "string",
"description": "The name of the schema containing the table."
},
{
"name": "tableName",
"in": "path",
"required": true,
"type": "string",
"description": "The name of the table."
},
{
"name": "maxRows",
"in": "query",
"required": false,
"type": "integer",
"format": "int64",
"description": "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."
},
{
"name": "maxColumns",
"in": "query",
"required": false,
"type": "integer",
"format": "int64",
"description": "The maximum number of columns to be retrieved."
},
{
"$ref": "#/parameters/ApiVersionParameter"
}
],
"responses": {
"200": {
"description": "Successfully retrieved preview rows for the specified table.",
"schema": {
"$ref": "#/definitions/USqlTablePreview"
}
}
},
"x-ms-examples": {
"Retrieves a preview set of rows in given table": {
"$ref": "./examples/Catalog_PreviewTable.json"
}
}
}
},
"/catalog/usql/databases/{databaseName}/schemas/{schemaName}/tables/{tableName}/partitions": {
"get": {
"tags": [
Expand Down Expand Up @@ -3657,6 +3792,42 @@
},
"description": "A Data Lake Analytics catalog type field information item."
},
"USqlTablePreview": {
"properties": {
"totalRowCount": {
"type": "integer",
"format": "int64",
"description": "the total number of rows in the table or partition."
},
"totalColumnCount": {
"type": "integer",
"format": "int64",
"description": "the total number of columns in the table or partition."
},
"rows": {
"type": "array",
"items": {
"type": "array",
"items": {
"type": "string"
}
},
"description": "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."
},
"truncated": {
"type": "boolean",
"description": "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."
},
"schema": {
"type": "array",
"items": {
"$ref": "#/definitions/USqlTableColumn"
},
"description": "the schema of the table or partition."
}
},
"description": "A Data Lake Analytics catalog table or partition preview rows item."
},
"USqlTable": {
"allOf": [
{
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
{
"parameters": {
"api-version": "2016-11-01",
"accountName": "contosoadla",
"adlaCatalogDnsSuffix": "azuredatalakeanalytics.net",
"databaseName": "master",
"schemaName": "dbo",
"tableName": "test_table_name"
},
"responses": {
"200": {
"body": {
"totalRowCount": 1,
"totalColumnCount": 2,
"rows": [
[
"value_a",
"value_b"
]
],
"truncated": false,
"schema": [
{
"name": "test_column_name",
"type": "test_data_type"
}
]
}
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
{
"parameters": {
"api-version": "2016-11-01",
"accountName": "contosoadla",
"adlaCatalogDnsSuffix": "azuredatalakeanalytics.net",
"databaseName": "master",
"schemaName": "dbo",
"tableName": "test_table_name",
"partitionName": "test_partition_name"
},
"responses": {
"200": {
"body": {
"totalRowCount": 1,
"totalColumnCount": 2,
"rows": [
[
"value_a",
"value_b"
]
],
"truncated": false,
"schema": [
{
"name": "test_column_name",
"type": "test_data_type"
}
]
}
}
}
}