Retrieve all DW Mapping Scripts

Retrieves all DW Mapping scripts.

Request Method Service URL

GET

/api-metadata/v1/{access-key}/metadata/dwmappingscripts

Request Headers

Content-Type=application/json

Request URL Example

http://{AccountURL}/api-metadata/v1/e2a7a0df2410470d85ef69c8dad2bdb8/metadata/dwmappingscripts

Response Body Example

{
  "tenantId": 103,
  "name": "c_tTable_prescript",
  "versionTS": 1583430529986,
  "active": true,
  "lastModifiedBy": "MCPS_TEST_ADMIN_USER",
  "createdBy": "MCPS_TEST_ADMIN_USER",
  "createdTS": 1583429003728,
  "type": "HIVE",
  "script": "INSERT INTO TABLE ${mcps:c_tTable:tableName|dw}  SELECT ${MCPS:c_fan:columns|default=$columnName} FROM (SELECT concat('PrimaryID_',tTable_ID) AS ID,  tTable_ID as Sourcec_tTable_ID,  'PrimaryID' as SourceID, max(tenantid) as tenantid,  max(createdby) as createdby,  max(modifiedby) as modifiedby,  max(createdts) as createdts,  max(modifiedts) as modifiedts,  max(rowcreatedts) as rowcreatedts,  max(rowmodifiedts) as rowmodifiedts FROM ${mcps:tTable:tableName|raw}  WHERE tTable_ID_id IS NOT NULL  GROUP BY tTable_ID_ID) a;",
  "disableDefault": false,
  "order": 1,
  "entityName": "c_tTable",
  "scriptId": "c_tTable_prescript"
}

Learn more

DW Mapping API

Sitemap