Update column information

put/sessions/{sessionId}/data/{libref}/{tableName}/columns/{columnName}

Updates the name, label, format, or informat information for a specified column.

Request Samples

1

Response Samples

1{
2 "byteLength": 128,
3 "charLength": 32,
4 "id": "ID",
5 "index": 1,
6 "label": "Districts code",
7 "length": 128,
8 "links": [
9 {
10 "href": "/compute/sessions/RKEY-ses0000/data/MAPSGFK/AFGHANISTAN/columns/ID",
11 "method": "GET",
12 "rel": "self",
13 "type": "application/vnd.sas.compute.data.table.column",
14 "uri": "/compute/sessions/RKEY-ses0000/data/MAPSGFK/AFGHANISTAN/columns/ID"
15 }
16 ],
17 "name": "ID",
18 "type": "VARCHAR",
19 "version": 2
20}

Path Parameters

NameTypeRequiredDescription
columnName
string
true

Specifies the column name to update.

libref
string<object-id>
true

Specifies the libref for the request.

sessionId
string<object-id>
true

Specifies the ID of the session.

tableName
string<object-id>
true

Specifies the table that contains the column to update.

Header Parameters

NameTypeRequiredDescription
If-Match
string
true

Specifies the ETag of the column that you are updating.

Request Body

Specifies the information to update for the column.

Describes a column from a table.

NameTypeRequiredDescription
version
integer<int32>
false

Specifies the version number of this representation schema. This is version 2.

id
string<object-id>
false

Specifies the identifier for this column.

name
string
false

Specifies the name for this column.

index
integer<int32>
false

Specifies the numerical index for this column. This is a zero-based index.

label
string
false

Specifies the label for this column. The label is optional.

length
integer<int32>
false

Specifies the length of the data in this column.

byteLength
integer<int32>
false

Specifies the byte length of the data in this column. This parameter is set to the same value as the Length field. Support for this parameter was added in version 2.

charLength
integer<int32>
false

Specifies the character length of the data in this column. This is set to same value as length for CHAR data type, the specified length for bounded VARCHAR data type, and "-1" for all other data types. Support for this parameter was added in version 2.

type
string
false

Specifies the data type of the column.

format
Simple Column Formatting
false

Specifies the format to use for values in a column.

informat
Simple Column Formatting
false

Specifies the format to use for values in a column.

Responses

StatusMeaningDescription
200OK

The request succeeded.

HeadersSchema
400Bad Request

The request was invalid.

Schema
404Not Found

No resource exists at the requested path.

Schema
412Precondition Failed

The If-Match request header did not match the resource's entity tag, or the If-Unmodified-Since request header did not match the resources last modified timestamp.

Schema
428Precondition Required

The request headers did not include an If-Match or If-Unmodified-Since precondition.

Schema