Unify and manage your data

Group Nested and Reference Attributes

Group nested and reference attributes (complex attributes) by one or several of the sub-attributes (called anchor attributes).

Group Nested and Reference Attributes by Anchor Attributes

Grouping of complex attributes allows you to group nested and reference attributes (complex attributes) by one or several of the sub-attributes (called anchor attributes). This allows placing values of complex attributes with the same values of the specified anchor attributes into the same column set. There's also a restriction on a possible number of column sets of a complex attribute. The restriction is needed to prevent the Export Service from generating a large number of separate column sets for each of complex attribute values in cases when the anchor attribute can take unique values across the entire tenant.

Table 1. Attribute Group Specifications
Name Required Details Type Default Example
attribute Yes A nested/reference attribute that needs to be grouped. String - "configuration/relationTypes/HasAddress/attributes/Phone"
anchorAttributes Yes

A list of simple sub-attributes that will be used to group values of the complex (parent) attribute.

At least one sub-attribute is expected.

Only non-blob simple attributes can be specified as anchor attributes.

Strings Array -
[
    "Type"
]
maxNumberOfUniqueValues No

A number that specifies how many unique values can be used to generate column sets.

The value should belong to this interval: [1, 2048].
Integer 64 128
Table 2. Attribute Group Errors
Error Code Reason Response Example
EXPORT_DATA_INVALID_PARAM(549) User did not specify the "attribute" field.
{
   "severity": "Error",
   "errorMessage": "Invalid export parameter: attribute. Reason: the \"attribute\" field cannot be empty.",
   "errorCode": 549,
   "errorDetailMessage": "Invalid export parameter: attribute. Reason: the \"attribute\" field cannot be empty."
}
EXPORT_DATA_INVALID_PARAM(549) User did not specify the "anchorAttributes" field.
{
   "severity": "Error",
   "errorMessage": "Invalid export parameter: anchorAttributes. Reason: the \"anchorAttributes\" field cannot be empty.",
   "errorCode": 549,
   "errorDetailMessage": "Invalid export parameter: anchorAttributes. Reason: the \"anchorAttributes\" field cannot be empty."
}
EXPORT_DATA_INVALID_PARAM(549) The "maxNumberOfUniqueValues" field has an incorrect value.
{
   "severity": "Error",
   "errorMessage": "Invalid export parameter: maxNumberOfUniqueValues. Reason: the value should belong to the following interval [1, 2048], but was 123456.",
   "errorCode": 549,
   "errorDetailMessage": "Invalid export parameter: maxNumberOfUniqueValues. Reason: the value should belong to the following interval [1, 2048], but was 123456."
}

Examples

These examples describe an export of entities.

Example Data Set

[  
   {  
      "uri":"entities/1",
      "type":"configuration/entityTypes/HCP",
      "attributes":{  
         "Name":[  
            {  
               "value":"John Smith"
            },
            {  
               "value":"J. Smith"
            }
         ],
         "Address":[  
            {  
               "value":{  
                  "AddressType":[  
                     {  
                        "value":"Mailing"
                     }
                  ],
                  "City":[  
                     {  
                        "value":"Dallas"
                     }
                  ],
                  "Phone":[  
                     {  
                        "value":{  
                           "Type":[  
                              {  
                                 "value":"Mobile"
                              }
                           ],
                           "Number":[  
                              {  
                                 "value":"+1 (000) 123-456"
                              }
                           ]
                        }
                     },
                     {  
                        "value":{  
                           "Type":[  
                              {  
                                 "value":"Fax"
                              }
                           ],
                           "Numer":[  
                              {  
                                 "value":"+1 (000) 000-456"
                              }
                           ]
                        }
                     }
                  ]
               }
            },
            {  
               "value":{  
                  "AddressType":[  
                     {  
                        "value":"Billing"
                     }
                  ],
                  "City":[  
                     {  
                        "value":"Dallas"
                     }
                  ]
               }
            },
            {  
               "value":{  
                  "AddressType":[  
                     {  
                        "value":"Mailing"
                     }
                  ],
                  "City":[  
                     {  
                        "value":"Houston"
                     }
                  ],
                  "Phone":[  
                     {  
                        "value":{  
                           "Type":[  
                              {  
                                 "value":"Fax"
                              }
                           ],
                           "Numer":[  
                              {  
                                 "value":"+1 (600) 123-000"
                              }
                           ]
                        }
                     }
                  ]
               }
            }
         ]
      }
   },
   {  
      "uri":"entities/2",
      "type":"configuration/entityTypes/HCP",
      "attributes":{  
         "Name":[  
            {  
               "value":"David Johnson"
            }
         ],
         "Address":[  
            {  
               "value":{  
                  "AddressType":[  
                     {  
                        "value":"Billing"
                     }
                  ],
                  "City":[  
                     {  
                        "value":"Albuquerque"
                     }
                  ]
               }
            },
            {  
               "value":{  
                  "AddressType":[  
                     {  
                        "value":"Mailling"
                     }
                  ],
                  "City":[  
                     {  
                        "value":"New York City"
                     }
                  ],
                  "Phone":[  
                     {  
                        "value":{  
                           "Type":[  
                              {  
                                 "value":"Mobile"
                              }
                           ],
                           "Number":[  
                              {  
                                 "value":"+1 (500) 000-000"
                              }
                           ]
                        }
                     }
                  ]
               }
            }
         ]
      }
   },
   {  
      "uri":"entities/3",
      "type":"configuration/entityTypes/HCP",
      "attributes":{  
         "Name":[  
            {  
               "value":"Williams Johnson"
            }
         ],
         "Address":[  
            {  
               "value":{  
                  "AddressType":[  
                     {  
                        "value":"Billing"
                     }
                  ],
                  "City":[  
                     {  
                        "value":"Chicago"
                     }
                  ]
               }
            }
         ]
      }
   },
   {  
      "uri":"entities/4",
      "type":"configuration/entityTypes/HCP",
      "attributes":{  
         "Name":[  
            {  
               "value":"W.A."
            }
         ],
         "Address":[  
            {  
               "value":{  
                  "AddressType":[  
                     {  
                        "value":"Mailing"
                     },
                     {  
                        "value":"Billing"
                     }
                  ],
                  "City":[  
                     {  
                        "value":"Chicago"
                     }
                  ]
               }
            }
         ]
      }
   }
]
Table 3. Example CSV Output File
ID Type Attributes.Name Attributes.Name2 Attributes.Address.AddressType Attributes.Address.AddressType2 Attributes.Address.City Attributes.Address.PhoneType
1 HCP John Smith J. Smith Mailing Dallas Mobile
2 HCP David Johnson Billing Albuquerque
3 HCP William Johnson Billing Billing Chicago
4 HCP W.A. Mailing Chicago
Table 4. Example CSV Output File (continued)
ID Type Attrributes.Name Attributes.Address.Phone.Number Attributes.Address.Phone2.Type Attributes.Address.Phone2.Number Attributes.Address2.AddressType Attributes.Address2.City Attributes.Address2.Phone.Type
1 HCP John Smith +1 (000) 123-456 Fax +1 (000) 000-456 Billing Dallas
2 HCP David Johnson Mailing New York City Mobile
3 HCP William Johnson
4 HCP W.A
Table 5. Example CSV Output File (continued)
ID Type Attributes.Name Attributes.Address.Phone.Number Attributes.Address3.AddressType Attributes.Address3.City Attributes.Address3.Phone.Type Attributes.Address3.Phone.Number
1 HCP John Smith Mailing Houston Fax +1 (600) 123-000
2 HCP David Johnson +1 (500) 000-000
3 HCP William Johnson
4 HCP W.A.

Example Parameters for the CSV Output File With Grouping Enabled

{  
   "groupBy":[  
      {  
         "attribute":"configuration/entityTypes/HCP/attributes/Address",
         "anchorAttributes":[  
            "AddressType"
         ]
      },
      {  
         "attribute":"configuration/entityTypes/HCP/attributes/Address/attributes/Phone",
         "anchorAttributes":[  
            "Type"
         ]
      }
   ]
}
Table 6. Example CSV Output File With Grouping Enabled
ID Type Attributes.Name Attributes.Name2 Attributes.Address.AddressType Attributes.Address.City Attributes.Address2.AddressType Attributes.Address2.City
1 HCP John Smith J. Smith Billing Dallas Mailing Dallas
2 HCP David Johnson Billing Albuquerque Mailing New York Citty
3 HCP William Johnson Billing Chicago
4 HCP W.A.
Table 7. Example CSV Output File With Grouping Enabled (continued)
ID Type Attrributes.Name Attributes.Address2.Phone.Type Attributes.Address.Phone.Number Attributes.Address2.Phone2.Type Attributes.Address2.Phone2.Number Attributes.Address3.AddressType Attributes.Address3.City
1 HCP John Smith Fax +1 (000) 000-456 Mobile +1 (000) 123-456 Mailing Houston
2 HCP David Johnson Mobile +1 (500) 000-000
3 HCP William Johnson
4 HCP W.A
Table 8. Example CSV Output File With Grouping Enabled (continued)
ID Type Attributes.Name Attributes.Address3.Phone.Type Attributes.Address3.Phone.Number Attributes.Address4.AddressType Attributes.Address4.AddressType2 Attributes.Address.City
1 HCP John Smith Fax +1 (600) 123-000
2 HCP David Johnson +1 (500) 000-000
3 HCP William Johnson
4 HCP W.A. Mailing Billing Chicago