---
title: Synchronizing a subset of fields from the source attribute
description: The following configuration can be used to synchronize the value and type fields of ubidEmailJSON from the source to a destination. To synchronize this source value:
component: pingdirectory
version: 11.0
page_id: pingdirectory:pingdatasync_server_administration_guide:pd_sync_subset_fields_source_attr
canonical_url: https://docs.pingidentity.com/pingdirectory/11.0/pingdatasync_server_administration_guide/pd_sync_subset_fields_source_attr.html
revdate: September 13, 2023
---

# Synchronizing a subset of fields from the source attribute

The following configuration can be used to synchronize the `value` and `type` fields of `ubidEmailJSON` from the source to a destination. To synchronize this source value:

```
ubidEmailJSON: {"value" : "jsmith@example.com",
                "type" : "home",
                "primary" : true}
```

to this value at the destination:

```
ubidEmailJSON: {"value" : "jsmith@example.com",
                "type" : "home"}
```

You can filter JSON field values in the `value-pattern` and `conditional-value-pattern` constructed attribute mapping *(tooltip: \<div class="paragraph">
\<p>Matching corresponding attributes between an IdP and an SP to identify federated users or add supplemental user information.\</p>
\</div>)* properties. This enables a given field value to only be mapped for values that match a given filter.

For example, if `ubidEmailJSON` is a JSON attribute and the `value` field is to be extracted only for values where the `type` field is equal to `work`, the value pattern specifying this would be as follows:

```json
{ubidEmailJSON.value({{"filterType":"equals","field":"type","value":"work"}})}
```

A JSON Attribute configuration object must be created and associated with the Sync Class. This can be done by either explicitly including the fields to synchronize:

```shell
$ bin/dsconfig create-json-attribute --pipe-name "A to B" \
  --class-name Users \
  --attribute-name ubidEmailJSON \
  --set include-field:type \
  --set include-field:value
```

Or by excluding the fields that should not be synchronized:

```shell
$ bin/dsconfig create-json-attribute \
  --pipe-name "A to B" \
  --class-name Users \
  --attribute-name ubidEmailJSON \
  --set exclude-field:preferred \
  --set exclude-field:verified
```

If the destination is prepared to only handle a specific subset of fields, then list the fields to include. However, if only a small, known subset of fields from the source should be excluded, then `exclude-field` could be used. In this example, the destination data for the `ubidEmailJSON` attribute will always be a subset of the full data.

|   |                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              |
| - | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
|   | A Sync Class can be configured to exclude certain attributes from synchronization. Creating a regular attribute mapping will override this setting, and the attribute will be synchronized. Creating a JSON attribute mapping does not override this setting, and the JSON attribute will not be synchronized. A JSON attribute is not a traditional attribute mapping. It only includes information on the destination attribute name. To work around this, the attribute either needs to be mapped from a source attribute, or have its value constructed. |

The following scenario illustrates how the destination can include additional fields that are not present at the source.
