Metavault API - Update data package table

UpdateDataPackageTable - PUT

Path

/api/projects/{projectId}/metavault/sourcesystems/{sourceNameOrId}/datapackages/{dataPackageNameOrId}/tables/{tableId}

Http Method

PUT

Overview

This query is used to update the Query or the Name of a datapackage table(staging table).

As both actions require database changes, either the Query or the Name can be updated at one time (i.e. per one call). Not both.

Required permissions

  • Write access to the Source module. BUILD WRITE

Request

Request body

JSON
{
  "query": "SELECT * FROM ...",
  "name": "myso01_mydatapackage1_newname"
}
Field descriptions

Field

Type

Required

Description

Constraints

query

string

Yes

The query associated with this View and or Table.

If the argument query differs from the existing query, it is updated.

If you change this parameter you are not allowed to change the name.

name

string

Yes

The name of the table.

If the argument name differs from the existing name, it is updated.

If you change this parameter you are not allowed to change the query.

Response

Success response (200 OK)

JSON
{
  "_embedded": {
    "columns": [
      {
        "id": "df84cf1a9690437894fa6f5506344167",
        "name": "column1",
        "dataType": "String",
        "length": 255,
        "baseType": {
          "isText": true,
          "isBinary": false,
          "type": "String",
          "dataType": "String",
          "length": 255,
          "autoIncrement": false
        },
        "nullable": false,
        "technicalDescription": "",
        "businessDescription": "",
        "businessName": "",
        "primaryKey": true,
        "typeFullName": "VARCHAR(255)"
      },
      {
        "id": "eb44fb54f6cb4198a06d546da230cb19",
        "name": "column2",
        "dataType": "String",
        "length": 50,
        "baseType": {
          "isText": true,
          "isBinary": false,
          "type": "String",
          "dataType": "String",
          "length": 50,
          "autoIncrement": false
        },
        "nullable": true,
        "technicalDescription": "",
        "businessDescription": "",
        "businessName": "",
        "primaryKey": false,
        "typeFullName": "VARCHAR(50)"
      },
      {
        "id": "ed64872843064b60845561bbc1d42059",
        "name": "column3",
        "dataType": "String",
        "length": 10,
        "baseType": {
          "isText": true,
          "isBinary": false,
          "type": "String",
          "dataType": "String",
          "length": 10,
          "autoIncrement": false
        },
        "nullable": true,
        "technicalDescription": "",
        "businessDescription": "",
        "businessName": "",
        "primaryKey": false,
        "typeFullName": "VARCHAR(10)"
      }
    ]
  },
  "id": "23973d8d0fea47bf8e45d991dbc33d5f",
  "tableName": "myso01_mydatapackage1_newname",
  "targetTableName": "myso01_mydatapackage1_newname",
  "targetSchemaName": "stg",
  "sourceSystemId": "3c24b0fb-a999-48e9-9b41-209412a47df3",
  "dataPackageId": "ca761ccf-1cbd-4d5f-92ca-bccef1c5deda",
  "query": "",
  "queryType": "Table",
  "isQueryBased": false
}