---
version: 20
data:

- type: "ApplicationModel"
  variation: null
  replacePermissions: true
  replaceObject: true
  attributes:
    automaticRelationCollection: false
    description: null
    displayName: "Stock and Procurement"
    modificationSets: []
  children:
  - type: "Version"
    variation: null
    replacePermissions: true
    replaceObject: true
    attributes:
      description: ""
      displayName: "Stock and Procurement V1"
      modellingConnection: "PROD2"
      modellingSchema: "inv"
      modificationSets: []
      startTableName: "items"
    children:
    - type: "DataRelationRule"
      variation: null
      replacePermissions: true
      replaceObject: true
      attributes:
        active: true
        columns:
        - "id"
        conditionScript: ""
        description: ""
        displayName: "ITEMS_TO_ORDER_ITEMS"
        lookupScript: ""
        namePattern: "items"
        referencedApplicationModel: "Customer Orders"
        referencedColumns:
        - "item_id"
        referencedTableName: "order_items"
        sqlLookupExpression: ""
        traversal: -1
    - type: "DataRelationRule"
      variation: null
      replacePermissions: true
      replaceObject: true
      attributes:
        active: true
        columns:
        - "source_id"
        - "item_id"
        conditionScript: ""
        description: ""
        displayName: "ITEM_SUPPLIER_TO_ITEM_SUPPLIER"
        lookupScript: ""
        namePattern: "item_supplier"
        referencedApplicationModel: null
        referencedColumns:
        - "supplier_id"
        - "item_id"
        referencedTableName: "item_supplier"
        sqlLookupExpression: ""
        traversal: -1
    - type: "DataRelationRule"
      variation: null
      replacePermissions: true
      replaceObject: true
      attributes:
        active: true
        columns:
        - "id"
        conditionScript: ""
        description: ""
        displayName: "ITEMS_TO_ITEM_SUPPLIER"
        lookupScript: ""
        namePattern: "items"
        referencedApplicationModel: null
        referencedColumns:
        - "item_id"
        referencedTableName: "item_supplier"
        sqlLookupExpression: ""
        traversal: -1
    - type: "DataRelationRule"
      variation: null
      replacePermissions: true
      replaceObject: true
      attributes:
        active: true
        columns:
        - "id"
        conditionScript: ""
        description: ""
        displayName: "ITEMS_TO_PROC_ORDER"
        lookupScript: ""
        namePattern: "items"
        referencedApplicationModel: null
        referencedColumns:
        - "item_id"
        referencedTableName: "proc_order"
        sqlLookupExpression: ""
        traversal: -1
    - type: "DataRelationRule"
      variation: null
      replacePermissions: true
      replaceObject: true
      attributes:
        active: true
        columns:
        - "supplier_id"
        conditionScript: ""
        description: ""
        displayName: "ITEM_SUPPLIER_TO_SUPPLIER"
        lookupScript: ""
        namePattern: "item_supplier"
        referencedApplicationModel: "Supplier"
        referencedColumns:
        - "id"
        referencedTableName: "supplier"
        sqlLookupExpression: ""
        traversal: -1

- type: "ApplicationModel"
  variation: null
  replacePermissions: true
  replaceObject: true
  attributes:
    automaticRelationCollection: false
    description: null
    displayName: "Address"
    modificationSets: []
  children:
  - type: "Version"
    variation: null
    replacePermissions: true
    replaceObject: true
    attributes:
      description: ""
      displayName: "Address V1"
      modellingConnection: "PROD1"
      modellingSchema: "ext"
      modificationSets: []
      startTableName: "address"

- type: "ApplicationModel"
  variation: null
  replacePermissions: true
  replaceObject: true
  attributes:
    automaticRelationCollection: false
    description: null
    displayName: "Customer"
    modificationSets: []
  children:
  - type: "Version"
    variation: null
    replacePermissions: true
    replaceObject: true
    attributes:
      description: ""
      displayName: "Customer V1"
      modellingConnection: "PROD1"
      modellingSchema: "ext"
      modificationSets: []
      startTableName: "customer"
    children:
    - type: "DataRelationRule"
      variation: null
      replacePermissions: true
      replaceObject: true
      attributes:
        active: true
        columns:
        - "address_id"
        conditionScript: ""
        description: ""
        displayName: "CUSTOMER_TO_ADDRESS"
        lookupScript: ""
        namePattern: "customer"
        referencedApplicationModel: "Address"
        referencedColumns:
        - "id"
        referencedTableName: "address"
        sqlLookupExpression: ""
        traversal: -1

- type: "ApplicationModel"
  variation: null
  replacePermissions: true
  replaceObject: true
  attributes:
    automaticRelationCollection: false
    description: null
    displayName: "Customer Orders"
    modificationSets: []
  children:
  - type: "Version"
    variation: null
    replacePermissions: true
    replaceObject: true
    attributes:
      description: ""
      displayName: "Customer Orders V1"
      modellingConnection: "PROD3"
      modellingSchema: "ord"
      modificationSets: []
      startTableName: "order_items"
    children:
    - type: "DataRelationRule"
      variation: null
      replacePermissions: true
      replaceObject: true
      attributes:
        active: true
        columns:
        - "id"
        conditionScript: ""
        description: ""
        displayName: "CUST_ORDER_TO_DISPATCH"
        lookupScript: ""
        namePattern: "cust_order"
        referencedApplicationModel: null
        referencedColumns:
        - "order_id"
        referencedTableName: "dispatch"
        sqlLookupExpression: ""
        traversal: -1
    - type: "DataRelationRule"
      variation: null
      replacePermissions: true
      replaceObject: true
      attributes:
        active: true
        columns:
        - "customer_id"
        conditionScript: ""
        description: ""
        displayName: "CUST_ORDER_TO_CUSTOMER"
        lookupScript: ""
        namePattern: "cust_order"
        referencedApplicationModel: "Customer"
        referencedColumns:
        - "id"
        referencedTableName: "customer"
        sqlLookupExpression: ""
        traversal: -1
    - type: "DataRelationRule"
      variation: null
      replacePermissions: true
      replaceObject: true
      attributes:
        active: true
        columns:
        - "order_id"
        conditionScript: ""
        description: ""
        displayName: "ORDER_ITMEMS_TO_CUST_ORDER"
        lookupScript: ""
        namePattern: "order_items"
        referencedApplicationModel: null
        referencedColumns:
        - "id"
        referencedTableName: "cust_order"
        sqlLookupExpression: ""
        traversal: -1

- type: "ApplicationModel"
  variation: null
  replacePermissions: true
  replaceObject: true
  attributes:
    automaticRelationCollection: false
    description: null
    displayName: "Supplier"
    modificationSets: []
  children:
  - type: "Version"
    variation: null
    replacePermissions: true
    replaceObject: true
    attributes:
      description: ""
      displayName: "Supplier V1"
      modellingConnection: "PROD1"
      modellingSchema: "ext"
      modificationSets: []
      startTableName: "supplier"
    children:
    - type: "DataRelationRule"
      variation: null
      replacePermissions: true
      replaceObject: true
      attributes:
        active: true
        columns:
        - "address_id"
        conditionScript: ""
        description: ""
        displayName: "SUPPLIER_TO_ADDRESS"
        lookupScript: ""
        namePattern: "supplier"
        referencedApplicationModel: "Address"
        referencedColumns:
        - "id"
        referencedTableName: "address"
        sqlLookupExpression: ""
        traversal: -1

- type: "Connection"
  variation: "postgres-connection"
  replacePermissions: true
  replaceObject: true
  attributes:
    copyUtilityOverSsh: "false"
    credential: "TMF"
    dataExtractGenericFetchSize: "400"
    displayName: "PROD1"
    extractPackageSize: "500"
    jdbcBatchActivated: "true"
    jdbcBatchSize: "500"
    modificationSets: []
    storageLocation: null
    threadCount: "4"
    url: "jdbc:postgresql://linuxdb2b:5432/prod1"

- type: "Connection"
  variation: "postgres-connection"
  replacePermissions: true
  replaceObject: true
  attributes:
    copyUtilityOverSsh: "false"
    credential: "TMF"
    dataExtractGenericFetchSize: "400"
    displayName: "PROD2"
    extractPackageSize: "500"
    jdbcBatchActivated: "true"
    jdbcBatchSize: "500"
    modificationSets: []
    storageLocation: null
    threadCount: "4"
    url: "jdbc:postgresql://linuxdb2b:5432/prod2"

- type: "Connection"
  variation: "postgres-connection"
  replacePermissions: true
  replaceObject: true
  attributes:
    copyUtilityOverSsh: "false"
    credential: "TMF"
    dataExtractGenericFetchSize: "400"
    displayName: "PROD3"
    extractPackageSize: "500"
    jdbcBatchActivated: "true"
    jdbcBatchSize: "500"
    modificationSets: []
    storageLocation: null
    threadCount: "4"
    url: "jdbc:postgresql://linuxdb2b:5432/prod3"

- type: "Connection"
  variation: "postgres-connection"
  replacePermissions: true
  replaceObject: true
  attributes:
    copyUtilityOverSsh: "false"
    credential: "TMF"
    dataExtractGenericFetchSize: "400"
    displayName: "SYSTEST"
    extractPackageSize: "500"
    jdbcBatchActivated: "true"
    jdbcBatchSize: "500"
    modificationSets: []
    storageLocation: null
    threadCount: "4"
    url: "jdbc:postgresql://linuxdb2b:5432/systest"

- type: "Credential"
  variation: null
  replacePermissions: true
  replaceObject: true
  attributes:
    certificateBasedAuthentication: false
    description: ""
    displayName: "TMF"
    keyFormat: null
    password: "{aes}a8b5c533a675a48ecf5a3aebfe23fd3f5ebeacbfd46b6d9c5810889350f68a97"
    privateKey: null
    user: "tmf"
  children:
  - type: "Permission"
    variation: null
    replacePermissions: true
    replaceObject: true
    attributes:
      administration: true
      applySql: false
      browse: false
      create: true
      delete: true
      diagnose: false
      execute: false
      grantee: "USER"
      granteeType: "ROLE"
      modifyData: false
      read: true
      script: true
      sourceUsage: false
      targetUsage: false
      write: true
  - type: "Permission"
    variation: null
    replacePermissions: true
    replaceObject: true
    attributes:
      administration: true
      applySql: false
      browse: false
      create: false
      delete: true
      diagnose: false
      execute: false
      grantee: "USER"
      granteeType: "ROLE"
      modifyData: false
      read: true
      script: false
      sourceUsage: false
      targetUsage: false
      write: true
  - type: "Permission"
    variation: null
    replacePermissions: true
    replaceObject: true
    attributes:
      administration: false
      applySql: false
      browse: false
      create: false
      delete: false
      diagnose: false
      execute: false
      grantee: "USER"
      granteeType: "ROLE"
      modifyData: false
      read: true
      script: false
      sourceUsage: false
      targetUsage: false
      write: true
  - type: "Permission"
    variation: null
    replacePermissions: true
    replaceObject: true
    attributes:
      administration: true
      applySql: false
      browse: false
      create: true
      delete: true
      diagnose: false
      execute: false
      grantee: "USER"
      granteeType: "ROLE"
      modifyData: false
      read: true
      script: true
      sourceUsage: false
      targetUsage: false
      write: true
  - type: "Permission"
    variation: null
    replacePermissions: true
    replaceObject: true
    attributes:
      administration: false
      applySql: false
      browse: false
      create: true
      delete: true
      diagnose: false
      execute: false
      grantee: "USER"
      granteeType: "ROLE"
      modifyData: false
      read: true
      script: false
      sourceUsage: false
      targetUsage: false
      write: true

- type: "Environment"
  variation: null
  replacePermissions: true
  replaceObject: true
  attributes:
    activationScript: null
    automaticDataReservation: false
    dataReservationDuration: null
    dataReservationNamePattern: "Reserved data by ${taskTemplate.displayName}-${task.displayName}"
    description: null
    displayName: "System Test"
    libraries: []
    modificationSets: []
    scriptLanguage: "JAVA_SCRIPT"
    startModelScript: null
    startModelSelection: "STATIC"
    tolerationMode: "STRICT"
  children:
  - type: "Permission"
    variation: null
    replacePermissions: true
    replaceObject: true
    attributes:
      administration: false
      applySql: false
      browse: false
      create: false
      delete: false
      diagnose: false
      execute: false
      grantee: "USER"
      granteeType: "ROLE"
      modifyData: false
      read: true
      script: false
      sourceUsage: false
      targetUsage: false
      write: false
  - type: "InstalledApplication"
    variation: null
    replacePermissions: true
    replaceObject: true
    attributes:
      active: true
      applicationModel: "Address"
      connection: "SYSTEST"
      description: ""
      modificationSets: []
      startModel: false
      tableSchema: "ext"
      version: "Address V1"
  - type: "InstalledApplication"
    variation: null
    replacePermissions: true
    replaceObject: true
    attributes:
      active: true
      applicationModel: "Customer"
      connection: "SYSTEST"
      description: ""
      modificationSets: []
      startModel: false
      tableSchema: "ext"
      version: "Customer V1"
  - type: "InstalledApplication"
    variation: null
    replacePermissions: true
    replaceObject: true
    attributes:
      active: true
      applicationModel: "Supplier"
      connection: "SYSTEST"
      description: ""
      modificationSets: []
      startModel: false
      tableSchema: "ext"
      version: "Supplier V1"
  - type: "InstalledApplication"
    variation: null
    replacePermissions: true
    replaceObject: true
    attributes:
      active: true
      applicationModel: "Stock and Procurement"
      connection: "SYSTEST"
      description: ""
      modificationSets: []
      startModel: true
      tableSchema: "inv"
      version: "Stock and Procurement V1"
  - type: "Permission"
    variation: null
    replacePermissions: true
    replaceObject: true
    attributes:
      administration: false
      applySql: false
      browse: false
      create: false
      delete: false
      diagnose: false
      execute: false
      grantee: "USER"
      granteeType: "ROLE"
      modifyData: false
      read: true
      script: false
      sourceUsage: false
      targetUsage: false
      write: false
  - type: "InstalledApplication"
    variation: null
    replacePermissions: true
    replaceObject: true
    attributes:
      active: true
      applicationModel: "Customer Orders"
      connection: "SYSTEST"
      description: ""
      modificationSets: []
      startModel: false
      tableSchema: "ord"
      version: "Customer Orders V1"

- type: "Environment"
  variation: null
  replacePermissions: true
  replaceObject: true
  attributes:
    activationScript: null
    automaticDataReservation: false
    dataReservationDuration: null
    dataReservationNamePattern: "Reserved data by ${taskTemplate.displayName}-${task.displayName}"
    description: null
    displayName: "Production"
    libraries: []
    modificationSets: []
    scriptLanguage: "JAVA_SCRIPT"
    startModelScript: null
    startModelSelection: "STATIC"
    tolerationMode: "STRICT"
  children:
  - type: "InstalledApplication"
    variation: null
    replacePermissions: true
    replaceObject: true
    attributes:
      active: true
      applicationModel: "Stock and Procurement"
      connection: "PROD2"
      description: ""
      modificationSets: []
      startModel: true
      tableSchema: "inv"
      version: "Stock and Procurement V1"
  - type: "Permission"
    variation: null
    replacePermissions: true
    replaceObject: true
    attributes:
      administration: false
      applySql: false
      browse: false
      create: false
      delete: false
      diagnose: false
      execute: false
      grantee: "USER"
      granteeType: "ROLE"
      modifyData: false
      read: true
      script: false
      sourceUsage: false
      targetUsage: false
      write: false
  - type: "InstalledApplication"
    variation: null
    replacePermissions: true
    replaceObject: true
    attributes:
      active: true
      applicationModel: "Customer"
      connection: "PROD1"
      description: ""
      modificationSets: []
      startModel: false
      tableSchema: "ext"
      version: "Customer V1"
  - type: "Permission"
    variation: null
    replacePermissions: true
    replaceObject: true
    attributes:
      administration: false
      applySql: false
      browse: false
      create: false
      delete: false
      diagnose: false
      execute: false
      grantee: "USER"
      granteeType: "ROLE"
      modifyData: false
      read: true
      script: false
      sourceUsage: false
      targetUsage: false
      write: false
  - type: "InstalledApplication"
    variation: null
    replacePermissions: true
    replaceObject: true
    attributes:
      active: true
      applicationModel: "Address"
      connection: "PROD1"
      description: ""
      modificationSets: []
      startModel: false
      tableSchema: "ext"
      version: "Address V1"
  - type: "InstalledApplication"
    variation: null
    replacePermissions: true
    replaceObject: true
    attributes:
      active: true
      applicationModel: "Customer Orders"
      connection: "PROD3"
      description: ""
      modificationSets: []
      startModel: false
      tableSchema: "ord"
      version: "Customer Orders V1"
  - type: "InstalledApplication"
    variation: null
    replacePermissions: true
    replaceObject: true
    attributes:
      active: true
      applicationModel: "Supplier"
      connection: "PROD1"
      description: ""
      modificationSets: []
      startModel: false
      tableSchema: "ext"
      version: "Supplier V1"

- type: "TaskTemplate"
  variation: "subset-task-template"
  replacePermissions: true
  replaceObject: true
  attributes:
    checkUniquenessAfterModification: "true"
    containerRetentionPeriod: "-1"
    deleteExecutionFilesOnSuccess: "false"
    description: ""
    displayName: "Environments_and_Applications_Example4"
    dropOption: "LEAVE"
    dropRestrictOnDrop: null
    executionRetentionPeriod: "P30D"
    extractQueueSize: "50"
    extractThreadCount: "1"
    extractTraceActive: "false"
    fetchKeysWithTempTable: "false"
    fillMode: "INSERT"
    generateAlias: null
    generateComment: null
    generateForeignKey: null
    generateGrant: null
    incompatibleAction: "ABORT"
    jdbcProfiling: "false"
    logLevel: "INFO"
    modificationSet: []
    modificationValidation: "false"
    resumeSubsetApply: "true"
    rowSelectionMode: "QUERY"
    sourceEnvironment: "Production"
    startCondition: "1 = 1"
    startConditionFile: null
    startConditionFileMapping: null
    subsetApplyDiscardsAggregation: "true"
    subsetApplyThreadCount: "1"
    targetEnvironment: "System Test"
    taskExecutionReport: []
    tolerationMode: "1"
    traceDataConfiguration: ""
    useUnmodifiedKeysForUpdate: "false"
    usingAliasedTables: "false"
  children:
  - type: "Task"
    variation: null
    replacePermissions: true
    replaceObject: true
    attributes:
      description: null
      displayName: "Example4"