AddDataPackageColumn - POST
|
Path |
/api/projects/{projectId}/metavault/sourcesystems/{sourceNameOrId}/datapackages/{dataPackageNameOrId}/tables/{tableNameOrId}/columns |
|---|---|
|
Http Method |
POST |
Overview
Add a column to a datapackage table that is not based on a query.
To add a column to a query-based column, simply edit the query.
Required permissions
-
Write access to the Source module. SOURCE WRITE
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" |
Request body
Before 7.0.0 :
{
"name": "page",
"dataType": "String",
"length": 10,
"precision": null,
"scale": null,
"nullable": true,
"technicalDescription": "the page",
"businessDescription": "The page of the person",
"businessName": "Pages",
"primaryKey": false
}
Starting from 7.0.0 (new column/HR types definitions respect the formalism defined in Metavault API - General concepts | Column types):
{
"name": "page",
"dataType": "String",
"dataTypeCustom": null,
"length": 10,
"precision": null,
"scale": null,
"nullable": true,
"technicalDescription": "the page",
"businessDescription": "The page of the person",
"businessName": "Pages",
"primaryKey": false
}
Field descriptions
Before 7.0.0 :
|
Field |
Type |
Required |
Description |
Constraints |
|---|---|---|---|---|
|
name |
string |
Yes |
The name of the column. |
|
|
dataType |
string |
Yes |
The database type of the underlying column. (based on https://learn.microsoft.com/en-us/dotnet/api/system.data.dbtype?view=net-10.0 ) |
|
|
dataTypeCustom |
string |
No |
|
|
|
length |
integer |
No |
The length of the underlying column type, if relevant. |
|
|
precision |
integer |
No |
The precision of the underlying column type, if relevant. |
|
|
scale |
integer |
No |
The scale of the underlying column type, if relevant. |
|
|
nullable |
boolean |
No |
Whether the underlying column can have null values. |
|
|
technicalDescription |
string |
No |
The technical description of the column. |
|
|
businessDescription |
string |
No |
The business description of the column. |
|
|
businessName |
string |
No |
The business name of the column. |
|
|
primaryKey |
boolean |
No |
Whether the column should be unique. |
|
Response
Success response (200 OK)
The full list of columns. See: Metavault API - Get datapackage table column list