.. index:: Core Operations; Occurrence Attachment .. _core-operation-occurrence-attachment: OccurrenceAttachment ================================== Applies an attachment to the sum of a group of records that share equal values for their ``Trial``, ``Time``, and ``OccurrenceKey`` fields. Once the attachment is applied, the result is proportionally allocated to all records in the group. Structure --------- .. code-block:: json { "_schema": "OccurrenceAttachment_1.0", "attachment": 1000, "currency": "GBP" } Parameters ---------- +----------------------+----------+------------------+-------------------------------------------------------------+ | Parameter Name | Required | Type | Description | +======================+==========+==================+=============================================================+ | ``attachment`` | Yes | ``double`` | The attachment value in currency units. Cannot be negative. | +----------------------+----------+------------------+-------------------------------------------------------------+ | ``currency`` | No | ``string`` | The currency in which ``attachment`` is defined. | +----------------------+----------+------------------+-------------------------------------------------------------+ Behaviour -------------- This is equivalent to the :doc:`scoped_attachment` with ``span_columns`` set to ``[Time, OccurrenceKey]`` and ``erode_columns`` set to ``[Time, OccurrenceKey]``. In other words, it applies a non-eroding attachment to occurrences generated by combining records with matching ``Time`` and ``OccurrenceKey`` values.