update-profile

Description

The update-profile command updates an existing profile in the system. It requires the profile ID and a JSON payload file that defines the updated profile configuration.

Syntax

Windows


CliTool.bat update-profile -i <profile_id> -f <path_to_json_file>

Linux


./CliTool.sh update-profile -i <profile_id> -f <path_to_json_file>

Example


CliTool.bat update-profile -i 12345 -f C:\profiles\update_profile.json

How to prepare the update-profile JSON payload

For update operations, first retrieve the current profile and then modify only the required fields.

  1. Step 1: Get the current profile

    
    CliTool.bat get-profile -i <profile_id>
  2. Step 2: Reuse valid metadata values

    If you need to re-check datasource, table, or default mappings, use:

    
    CliTool.bat get-all-datasource-names-for-logged-in-user
    CliTool.bat search-table -d <dataSourceName>
    CliTool.bat get-default-attribute-column-mapping -d <dataSourceName> -t <tableName>
  3. Step 3: Update only the allowed fields

    • use a valid dataSourceName
    • use a valid dbTableName
    • use valid attributeColumnMappings
    • update attributeName and isKeyAttribute as required
    • keep exactly one key attribute mapping
    • keep exactly one master table
Note: Important restrictions for master profile updates.

If the profile being updated is already the master profile:

  • - you cannot change isMasterProfile from true to false
  • - you cannot remove its profile table
  • - you cannot change its dataSourceName
  • - you cannot change its dbTableName
  • - you cannot remove existing attribute mappings from the master table

JSON Payload Example

{
  "name": "Customer",
  "description": "Updated customer profile configuration",
  "keyAttribute": "AUDIENCE_KEY",
  "isMasterProfile": true,
  "profileTables": [
    {
      "id": 4,
      "dataSourceName": "UnicaDetectDS",
      "dbTableName": "customer_profile",
      "keyAttributeColumn": "AUDIENCE_KEY",
      "isMasterTable": true,
      "attributeColumnMappings": [
        {
          "databaseColumn": {
            "name": "AUDIENCE_KEY",
            "typeCode": 12,
            "isPrimaryKey": false
          },
          "attributeName": "AUDIENCE_KEY",
          "isKeyAttribute": true
        },
        {
          "databaseColumn": {
            "name": "firstName",
            "typeCode": 12,
            "isPrimaryKey": false
          },
          "attributeName": "firstName",
          "isKeyAttribute": false
        },
        {
          "databaseColumn": {
            "name": "lastName",
            "typeCode": 12,
            "isPrimaryKey": false
          },
          "attributeName": "lastName",
          "isKeyAttribute": false
        },
        {
          "databaseColumn": {
            "name": "city",
            "typeCode": 12,
            "isPrimaryKey": false
          },
          "attributeName": "city",
          "isKeyAttribute": false
        },
        {
          "databaseColumn": {
            "name": "mobileNumber",
            "typeCode": 12,
            "isPrimaryKey": false
          },
          "attributeName": "mobileNumber",
          "isKeyAttribute": false
        }
      ]
    }
  ]
}

Notes

  • The profile ID is passed on the command line using -i <profile_id>.
  • If present, profileTables[].id should match the existing table returned by get-profile.
  • dataSourceName, dbTableName, and attributeColumnMappings should be based on helper command output rather than manually invented metadata.