Datatamer / Datatamer/tamr-client
Invalid api requests when using project.published_cluster_stats()
- Dominant language
- Python
- Stars
- 11
- Forks
- 24
- PR merge metrics
- No merged PRs in 30d
Description
# 🐛 bug report
When getting the _dedup_published_cluster_stats dataset using the project.published_cluster_stats() function the returned dataset is unusable. Attempts to stream to a df or profile it both fail, with the client attempting to call non-existent apis.
Getting the same dataset using generic dataset methods (e.g. all_datasets_collection.by_name()) returns a usable dataset that can be streamed and profiled.
## 🤔 Expected Behavior
After returning the _dedup_published_cluster_stats, I should be able to carry out all the actions I can do to a dataset obtained via other functions, such as stream to a df.
## 😯 Current Behavior
When trying to profile the dataset returned with this function, it attempts to call
`http://:9100/api/versioned/v1/projects/1/publishedClusterStats/profile:refresh`
Which does not exist. The only publishedClusterStats api I can find is:
`http://:9100/api/versioned/v1/projects/2/publishedClusterStats:refresh`
The dataset object returned looks correct and identical to that obtained from other methods, e.g. `tamr_unify_client.dataset.resource.Dataset(relative_id='datasets/44', name='tdg_customers_dedup_published_cluster_stats', version='772')`
But when trying to call other actions it seems that the client is assuming endpoints that don't exist for publishedClusterStats.
## 💁 Possible Solution
Keep project.published_cluster_stats() as a quick shortcut to get this dataset, but treat the dataset returned as any other dataset.
## 🔦 Context
I was trying to access the _dedup_published_cluster_stats dataset to produce some cluster stats for a customer, but was blocked by the client. I went back to getting the dataset by name instead.
## 💻 Code Sample
```
project = project.as_mastering()
cluster_stats_dataset = project.published_cluster_stats()
df = pd.DataFrame.from_dict(cluster_stats_dataset.records())
cluster_stats_dataset.create_profile()
```
## 🌍 Your Environment
Running locally on my mac, accessing an on-prem instance via a VPN. Tamr is running 2020.16.02 on RHEL7.
| Software | Version(s) |
| ----------------- | ---------- |
| tamr-unify-client | 0.11.1
| Tamr server | ?
| Python | 3.6.5
| Operating System | Linux
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.