|
| 1 | +Airdrop uses transformation methods to map data from one data model to another. |
| 2 | +These methods operate at the individual field level, transforming data field-by-field rather than entire records at once. |
| 3 | +Each transformation method has specific requirements regarding the field types and data formats it can work with. |
| 4 | +If the source data field does not meet these requirements for a particular transformation method, that mapping option is not available for selection during the mapping configuration process. |
| 5 | + |
| 6 | +There are several reasons why some mappings might be unavailable: |
| 7 | + |
| 8 | +1. A common reason is mismatch of types. For example, if a DevRev field is expected to be `rich_text`, |
| 9 | +but the field is set as `text` mapping to some fields is unavailable. |
| 10 | +2. Only references can be mapped to references. Ensure that source system fields are correctly |
| 11 | +mapped to reference fields in DevRev. |
| 12 | +3. Support for the `struct` type is limited. Marking a field as a struct in the metadata schema will |
| 13 | +make it unavailable for mapping outside of using the custom jq transformation method. |
| 14 | +4. Links are supported only on works and conversations. |
| 15 | + |
| 16 | +## Transformation methods |
| 17 | +The following tables outline the available transformation methods categorized by their applicable field types: |
| 18 | + |
| 19 | +### Custom fields transformation methods |
| 20 | + |
| 21 | +| Method | Description | Requirements | |
| 22 | +|--------|-------------|-------------| |
| 23 | +| `make_constrained_simple_value` | Propagates validation constraints from the external system and enforces those in DevRev | - | |
| 24 | +| `make_enum` | Produces an enum field | External field must be of type enum | |
| 25 | +| `make_uenum` | Produces an enum field | External field must be of type enum | |
| 26 | +| `reference_custom_field` | Produces a reference field | External field must be of type reference | |
| 27 | + |
| 28 | +### Metadata extraction transformation methods |
| 29 | + |
| 30 | +| Method | Description | Requirements | |
| 31 | +|--------|-------------|-------------| |
| 32 | +| `make_custom_stages` | Makes custom stages | Requires stage diagram data in the domain metadata | |
| 33 | +| `map_enum` | Produces an enum field | External field must be of type enum | |
| 34 | +| `map_roles` | Maps permission roles from external to DevRev format | - | |
| 35 | +| `use_as_array_value` | Produces an array field | External field must be a scalar (single-value) | |
| 36 | +| `use_devrev_record` | Enables use of a fixed reference to something in DevRev | DON should be of the right type | |
| 37 | +| `use_directly` | Identity operator that returns exactly the input | External field must be of the same type as the DevRev field; if external field is an array, internal field must also be an array | |
| 38 | +| `use_fixed_value` | Produces a fixed value in DevRev | Only available for boolean or enum DevRev fields | |
| 39 | + |
| 40 | +### Custom and stock fields transformation methods |
| 41 | + |
| 42 | +| Method | Description | Requirements | |
| 43 | +|--------|-------------|-------------| |
| 44 | +| `use_rich_text` | Produces a rich text field | External field must be of type `rich_text` | |
| 45 | + |
| 46 | +### Constructed custom fields transformation methods |
| 47 | + |
| 48 | +| Method | Description | Requirements | |
| 49 | +|--------|-------------|-------------| |
| 50 | +| `construct_text_field` | Produces a text field | External field must be of type text | |
| 51 | + |
| 52 | +### Universal transformation method |
| 53 | + |
| 54 | +| Method | Description | Requirements | |
| 55 | +|--------|-------------|-------------| |
| 56 | +| `use_raw_jq` | Enables the use of `jq` to transform data | Can be used on all fields, but should be used sparingly, only if no other transformation method is available | |
0 commit comments