Record

See https://docs.tamr.com/reference/record “The recommended approach for modifying records is to use the upsert() and delete() functions for all use cases they can handle. For more advanced use cases, the underlying _update() function can be used directly.”

tamr_client.record.upsert(session, dataset, records, *, primary_key_name=None)

Create or update the specified records.

Parameters
  • dataset (Dataset) – Dataset to receive record updates

  • records (Iterable[Dict]) – The records to update, as dictionaries

  • primary_key_name (Optional[str]) – The primary key for these records, which must be a key in each record dictionary. By default the key_attribute_name of dataset

Return type

Dict[str, Any]

Returns

JSON response body from server

Raises
tamr_client.record.delete(session, dataset, records, *, primary_key_name=None)

Deletes the specified records, based on primary key values. Does not check that other attribute values match.

Parameters
  • dataset (Dataset) – Dataset from which to delete records

  • records (Iterable[Dict]) – The records to update, as dictionaries

  • primary_key_name (Optional[str]) – The primary key for these records, which must be a key in each record dictionary. By default the key_attribute_name of dataset

Return type

Dict[str, Any]

Returns

JSON response body from server

Raises
tamr_client.record._update(session, dataset, updates)

Send a batch of record creations/updates/deletions to this dataset. You probably want to use upsert() or delete() instead.

Parameters
Return type

Dict[str, Any]

Returns

JSON response body from server

Raises

requests.HTTPError – If an HTTP error is encountered

tamr_client.record.stream(session, dataset)

Stream the records in this dataset as Python dictionaries.

Parameters

dataset (Union[Dataset, UnifiedDataset]) – Dataset from which to stream records

Return type

Iterator[Dict[str, Any]]

Returns

Python generator yielding records

tamr_client.record.delete_all(session, dataset)

Delete all records in this dataset

Parameters

dataset (Union[Dataset, UnifiedDataset]) – Dataset from which to delete records