Sql Pool Table Columns - List By Table Name

Gets columns in a given table in a SQL pool.

GET https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Synapse/workspaces/{workspaceName}/sqlPools/{sqlPoolName}/schemas/{schemaName}/tables/{tableName}/columns?api-version=2021-06-01
GET https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Synapse/workspaces/{workspaceName}/sqlPools/{sqlPoolName}/schemas/{schemaName}/tables/{tableName}/columns?api-version=2021-06-01&$filter={$filter}

URI Parameters

Name In Required Type Description
resourceGroupName
path True

string

The name of the resource group. The name is case insensitive.

schemaName
path True

string

The name of the schema.

sqlPoolName
path True

string

SQL pool name

subscriptionId
path True

string

The ID of the target subscription.

tableName
path True

string

The name of the table.

workspaceName
path True

string

The name of the workspace.

api-version
query True

string

The API version to use for this operation.

$filter
query

string

An OData filter expression that filters elements in the collection.

Responses

Name Type Description
200 OK

SqlPoolColumnListResult

OK

Other Status Codes

*** Error Responses: ***

  • 404 SubscriptionDoesNotHaveServer - The requested server was not found

  • 404 SourceDatabaseNotFound - The source database does not exist.

  • 404 DatabaseDoesNotExist - User has specified a database name that does not exist on this server instance.

  • 404 InvalidDatabaseSchema - Schema is missing in database.

  • 404 InvalidDatabaseTable - Table is missing in database.

  • 404 InvalidDatabaseColumn - Column is missing in table.

Examples

List the columns in a table of a given schema in a SQL Analytics pool

Sample Request

GET https://management.azure.com/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/myRG/providers/Microsoft.Synapse/workspaces/serverName/sqlPools/myDatabase/schemas/dbo/tables/table1/columns?api-version=2021-06-01

Sample Response

{
  "value": [
    {
      "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/myRG/providers/Microsoft.Synapse/workspaces/serverName/sqlPools/myDatabase/schemas/dbo/tables/table1/columns/col1",
      "name": "col1",
      "type": "Microsoft.Synapse/workspaces/sqlPools/schemas/tables/columns",
      "properties": {
        "columnType": "nvarchar"
      }
    },
    {
      "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/myRG/providers/Microsoft.Synapse/workspaces/serverName/sqlPools/myDatabase/schemas/dbo/tables/table1/columns/col2",
      "name": "col2",
      "type": "Microsoft.Synapse/workspaces/sqlPools/schemas/tables/columns",
      "properties": {
        "columnType": "bit"
      }
    }
  ]
}

Definitions

Name Description
ColumnDataType

The column data type.

SqlPoolColumn

A Sql pool column resource.

SqlPoolColumnListResult

A list of Sql pool columns.

ColumnDataType

The column data type.

Name Type Description
bigint

string

binary

string

bit

string

char

string

date

string

datetime

string

datetime2

string

datetimeoffset

string

decimal

string

float

string

geography

string

geometry

string

hierarchyid

string

image

string

int

string

money

string

nchar

string

ntext

string

numeric

string

nvarchar

string

real

string

smalldatetime

string

smallint

string

smallmoney

string

sql_variant

string

sysname

string

text

string

time

string

timestamp

string

tinyint

string

uniqueidentifier

string

varbinary

string

varchar

string

xml

string

SqlPoolColumn

A Sql pool column resource.

Name Type Description
id

string

Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}

name

string

The name of the resource

properties.columnType

ColumnDataType

The column data type.

properties.isComputed

boolean

Indicates whether column value is computed or not

type

string

The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"

SqlPoolColumnListResult

A list of Sql pool columns.

Name Type Description
nextLink

string

Link to retrieve next page of results.

value

SqlPoolColumn[]

Array of results.