Skip to main content

RecordCopier Python Class

Important

This Python SDK uses outdated technology that limits your extension opportunities. We've built a new Platform SDK using Python and the latest open-source technology to deliver a vastly improved development experience. Go to Platform SDK to get started!

The RecordCopier class provides a system for managing and duplicating new records based off an existing record. RecordRef represents a reference to a record’s underlying data, and can be accessed & manipulated via the RecordCopier class.

Methods

_init_

Instantiates a new instance of the RecordCopier class.

__init__((RecordInfo)destination, (RecordInfo)source,
     (bool)suppress_size_only_conversion_errors=False,
     (str)decimal_separator='.') -> None :
  • destination: The RecordInfo object that represents the connection to which the data is copied.

  • source: The RecordInfo object that represents the connection from which the data is copied.

  • suppress_size_only_conversion_errors: An option to suppress errors that occur during data conversion when the destination field size is too small.

  • decimal_separator: An option that sets the decimal separator when making string-to-number or number-to-string conversions. The option can be set to equal '.' or ','.

add

Adds a field index mapping to the list of field mappings stored by RecordCopier by specifying the destination and source field indexes.

add((int)destination_field_num, (int)source_field_num) -> None :
  • destination_field_num: The zero-based index of the field in the destination RecordInfo object.

  • source_field_num: The zero-based index of the field in the source RecordInfo object.

Call RecordCopier.DoneAdding when you are finished adding field mappings.

copy

Copies the contents of the source RecordRef into the destination RecordCreator based upon the RecordCopier's field mapping. The field mappings must match between the RecordRef and the destination RecordCreator.

copy((RecordCreator)destination, (RecordRef)source) -> None :

RecordCopier.DoneAdding must be called before this function to achieve a successful copy.

done_adding

Notifies the RecordCopier that have been added.

done_adding() -> None :

set_dest_to_null

Sets the field values for the destination RecordCreator to [Null].

set_dest_to_null((RecordCreator)destination) -> None :