English

Metavault API - Get datapackage table column

GetDataPackageTableColumn - GET

Path

/api/projects/{projectId}/metavault/sourcesystems/{sourceNameOrId}/datapackages/{dataPackageNameOrId}/tables/{tableNameOrId}/columns/{columnNameOrId}

Http Method

GET

Overview

Retrieve a single column from a datapackage table.

Required permissions

  • Read access to the Source module. SOURCE READ

Request

Path parameters

Parameter

Type

Required

Description

Example

sourceNameOrId

string

Yes

The name of the source or the technical id of the source where the column lives.

"e605eb83-d483-4738-a56f-f5b848f2f54d"

dataPackageNameOrId

string

Yes

The name or the id of the datapackage where the column lives.

"f134eb83-d483-4738-a56f-f5b848f2f54d"

tableNameOrId

string

Yes

The name or the id of the table in which the column is.

"ee55eb83-d483-4738-a56f-f5b848f2f54d"

columnNameOrId

string

Yes

The name or the id of the column

"aa4ecb83-d483-4738-a56f-f5b848f2f54d"

Response

Success response (200 OK)

Before 7.0.0 :

JSON
{
  "id": "c9959f39775d47d7b6b4309032584936",
  "name": "relevance",
  "dataType": "String",
  "length": 255,
  "baseType": {
    "type": "String",
    "dataType": "String",
    "length": 255
  },
  "nullable": true,
  "primaryKey": false,
  "typeFullName": "VARCHAR(255)"
}

Starting from 7.0.0 (new column/HR types definitions respect the formalism defined in Metavault API - General concepts | Column types) For specifics of the columns of data package tables, see response of: Metavault API - Create data package table:

JSON
{
  "id": "c9959f39775d47d7b6b4309032584936",
  "name": "relevance",
  "nullable": true,
  "primaryKey": false,
  "dataType": "String",
  "dataTypeCustom": null,
  "length": 255,
  "precision": null,
  "scale": null,
  "typeFullName": "VARCHAR(255)",
  "baseDataType": "String",
  "baseDataTypeCustom": null,
  "baseLength": 255,
  "basePrecision": null,
  "baseScale": null,
  "baseTypeFullName": "VARCHAR(255)",   
  "hardRuleDataType": null,
  "hardRuleDataTypeCustom": null,
  "hardRuleLength": null,
  "hardRulePrecision": null,
  "hardRuleScale": null,
  "hardRuleTypeFullName": null
}
Response fields

Before 7.0.0 :

Field

Type

Description

id

string

The generated technical id of the column. Used in the API.

name

string

The name of the column.

hardRuleDefinition

string

If this is null there is no hard rule defined for the column. Otherwise, the hard rule defined here is applied to the column.

dataType

string

The type of the actual output of the data of this column. So, the type of the output of the hard rule function if there is one, and the base type otherwise. (based on https://learn.microsoft.com/en-us/dotnet/api/system.data.dbtype?view=net-10.0 )

length

integer

The length of the actual output of the data of this column. So, the length of the output of the hard rule function if there is one, and the base type’s length otherwise.

precision

integer

The precision of the actual output of the data of this column. So, the precision of the output of the hard rule function if there is one, and the base type’s precision otherwise.

scale

integer

The scale of the actual output of the data of this column. So, the scale of the output of the hard rule function if there is one, and the base type’s scale otherwise.

baseType

object

The properties of the base type of the column. If no hard rule was applied.

baseType.dataType

string

The base type’s datatype (based on https://learn.microsoft.com/en-us/dotnet/api/system.data.dbtype?view=net-10.0 )

baseType.length

integer

The base type’s length

baseType.precision

integer

The base type’s precision

baseType.scale

integer

The base type’s scale

baseType.*

(various types)

Other undocumented fields are implementation-specific and should not be used.

nullable

boolean

Whether the data of this column is allowed to be null.

technicalDescription

string

The technical description of this column.

businessDescription

string

The business description of this column.

primaryKey

boolean

Whether the data of this column is considered unique.

typeFullName

string

A string representation of the type in this column.

Starting from 7.0.0 (new column/HR types definitions respect the formalism defined in Metavault API - General concepts | Column types) For specifics of the columns of data package tables, see response of: Metavault API - Create data package table.