Dataset¶
-
tamr_client.dataset.by_resource_id(session, instance, id)[source]¶ Get dataset by resource ID
Fetches dataset from Tamr server
- Parameters
instance (
Instance) – Tamr instance containing this datasetid (
str) – Dataset ID
- Raises
dataset.NotFound – If no dataset could be found at the specified URL. Corresponds to a 404 HTTP error.
requests.HTTPError – If any other HTTP error is encountered.
- Return type
Dataset
-
tamr_client.dataset.by_name(session, instance, name)[source]¶ Get dataset by name
Fetches dataset from Tamr server
- Parameters
instance (
Instance) – Tamr instance containing this datasetname (
str) – Dataset name
- Raises
dataset.NotFound – If no dataset could be found with that name.
dataset.Ambiguous – If multiple targets match dataset name.
requests.HTTPError – If any other HTTP error is encountered.
- Return type
Dataset
-
tamr_client.dataset.attributes(session, dataset)[source]¶ Get all attributes from a dataset
- Parameters
dataset (
Dataset) – Dataset containing the desired attributes- Return type
Tuple[Attribute, …]- Returns
The attributes for the specified dataset
- Raises
requests.HTTPError – If an HTTP error is encountered.
-
tamr_client.dataset.materialize(session, dataset)[source]¶ Materialize a dataset and wait for the operation to complete Materializing consists of updating the dataset (including records) in persistent storage (HBase) based on upstream changes to data.
- Parameters
dataset (
Dataset) – A Tamr dataset which will be materialized- Return type
Operation
-
tamr_client.dataset.delete(session, dataset, *, cascade=False)[source]¶ Deletes an existing dataset
Sends a deletion request to the Tamr server
- Parameters
dataset (
Dataset) – Existing dataset to deletecascade (
bool) – Whether to delete all derived datasets as well
- Raises
dataset.NotFound – If no dataset could be found at the specified URL. Corresponds to a 404 HTTP error.
requests.HTTPError – If any other HTTP error is encountered.
-
tamr_client.dataset.get_all(session, instance, *, filter=None)[source]¶ Get all datasets from an instance
- Parameters
- Return type
Tuple[Dataset, …]- Returns
The datasets retrieved from the instance
- Raises
requests.HTTPError – If an HTTP error is encountered.
-
tamr_client.dataset.create(session, instance, *, name, key_attribute_names, description=None, external_id=None)[source]¶ Create a dataset in Tamr.
- Parameters
- Return type
Dataset- Returns
Dataset created in Tamr
- Raises
dataset.AlreadyExists – If a dataset with these specifications already exists.
requests.HTTPError – If any other HTTP error is encountered.