Skip to content

Invalid api requests when using project.published_cluster_stats()#459

Description

@wpmartin

馃悰 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://<ip-address>:9100/api/versioned/v1/projects/1/publishedClusterStats/profile:refresh
Which does not exist. The only publishedClusterStats api I can find is:
http://<ip-address>: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

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions