Closed skalish closed 3 years ago
The actual modeling of AttributeMapping raises a couple of questions. Its own URL specifies the project it belongs to, and aside from that, the useful properties are the input and unified attributes that are being mapped between. The least expensive way that these attributes can be a part of the AttributeMapping object is as URLs. Another option is to actual construct them as Attribute objects, but this would require making two API calls per mapping, which for the get_all
function could be unreasonable.
Turns out that the POST /v1/projects/{project}/attributeMappings
API call will create the target unified attribute if it doesn't already exist, so "bootstrapping" is built in.
:tada: This issue has been resolved in version 1.3.0 :tada:
The release is available on:
v1.3.0
Your semantic-release bot :package::rocket:
💬 RFC
Attribute mappings are descriptions of how attributes of source datasets are connected to attributes of a project’s unified dataset. A single mapping links one source attribute to one unified attribute. Currently, there are three versioned API endpoints that need to be added to tamr_client:
GET /v1/projects/{project}/attributeMappings
POST /v1/projects/{project}/attributeMappings
DELETE /v1/projects/{project}/attributeMappings/{mappingAttributeIds}
An Attribute Mapping, as returned in the body of the response to these calls, is defined as a JSON dict:
Because of redundancy between the id fields and attribute names, this can be summarized more concisely as
💁 Possible Solution
💻 Examples