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
- Return type
- Returns
JSON response body from server
- Raises
requests.HTTPError – If an HTTP error is encountered
primary_key.NotFound – If primary_key_name does not match dataset primary key
primary_key.NotFound – If primary_key_name not in a record dictionary
-
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
- Return type
- Returns
JSON response body from server
- Raises
requests.HTTPError – If an HTTP error is encountered
primary_key.NotFound – If primary_key_name does not match dataset primary key
primary_key.NotFound – If primary_key_name not in a record dictionary
-
tamr_client.record.
_update
(session, dataset, updates)¶ Send a batch of record creations/updates/deletions to this dataset. You probably want to use
upsert()
ordelete()
instead.- Parameters
dataset (
Dataset
) – Dataset containing records to be updatedupdates (
Iterable
[Dict
]) – Each update should be formatted as specified in the Public Docs for Dataset updates.
- Return type
- 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.