logicaldatamodel

Get a diff and a MAQL script

This method retrieves the generated diff between two project models and MAQL DDL scripts.<br/> The diff between the two models is represented by script operations that you can execute on the current project model to make it equal to the submitted targetModel. If no difference exists between the current model and its targetState, the returned list of update operations is empty.<br/> This example simulates the MAQL script generated by the resource for generating a diff and a MAQL DDL script.<br/> The updateScripts section of the response contains one or more unique versions of MAQL DDL, which you can execute to update the project model. Some combinations of update options may not be available.

get/gdc/projects/{projectId}/model/diff/{diffId}

Request

  • Base URL
    https://secure.gooddata.com
  • Auth
    none declared

Response

OK - view of project's model

Example response

{
  "projectModelDiff": {
    "updateOperations": [
      {
        "updateOperation": {
          "type": "create.fact",
          "dataset": "dataset.employee",
          "description": "Create Fact '%s'"
        }
      }
    ],
    "updateScripts": [
      {
        "updateScript": {
          "maqlDdl": "CREATE FOLDER {ffld.employee} VISUAL(TITLE 'Employee Age', FOLDER {ffld.employee}) AS {f_employee.f_age};\nALTER DATASET {dataset.employee} ADD {fact.employee.age};\nSYNCHRONIZE {dataset.employee} PRESERVE DATA;",
          "maqlDdlChunks": "CREATE FOLDER {ffld.employee} VISUAL(TITLE 'Employee Age', FOLDER {ffld.employee}) AS {f_employee.f_age};\nALTER DATASET {dataset.employee} ADD {fact.employee.age};\nSYNCHRONIZE {dataset.employee} PRESERVE DATA;"
        }
      }
    ],
    "impactedVisualObjects": [
      {
        "impactedVisualObject": {
          "identifier": "attr.employee.employee_name",
          "category": "impactedVisualObject",
          "title": "Employee Name",
          "uri": "/gdc/md/a7ooaoq15e6ucrvoe986dxfqzbqutqzc/obj/20654"
        }
      }
    ],
    "computedAttributesScript": {
      "maqlDdlChunks": "CREATE FOLDER {ffld.employee} VISUAL(TITLE 'Employee Age', FOLDER {ffld.employee}) AS {f_employee.f_age};\nALTER DATASET {dataset.employee} ADD {fact.employee.age};\nSYNCHRONIZE {dataset.employee} PRESERVE DATA;"
    }
  }
}

Changes

No recorded changes to this operation across all 1 revision of this API.