Define Attributes

DataDefinitionResource.defineAttributes(request, sub_analysis_id, **kwargs)

Prior mandatory steps 1) Upload dataset 2) Create analysis 3) Create sub-analysis 4) GetAttributedetails

Define attributes is to define (overwrite) the attribute details that are automatically detected by Intuceo. If user wants to update any attribute information that is detected automatically, they can do so by this function. For example, user wants to merge a categorical levels of attribute A or change an attribute “C” type from Numeric to categorical, use the data definition file obtained from GetAttributeDetail function and change the Merge option to “y” for attribute A and Type of the attribute C to “Categorical”.

Note: Do not modify Intuceo name when you are updating attributes


sub_analysis_id Give sub analysis id
attributes_detail give meta data in mentioned format

Possible errors

Error message
Invalid sub analysis id
Invalid attributes detail. Unable to parse
Invalid attributes detail. Unexpected token <token>
Invalid attributes detail. Attribute name mismatch with datafile : <name>

POST Request Example

curl -u username:password -X POST -F 'attributes_detail=[{"Actionable": "Y", "Business Name": "campaign", "Group Name": "General", "Intuceo name": "campaign", "Merge": "N", "Type": "numeric"}, {"Actionable": "Y", "Business Name": "job", "Group Name": "General", "Intuceo name": "job", "Merge": "N", "Type": "categorical"}]' {url_prefix}/attributes/{sub_analysis_id}/

Response Example

    "error": false,
    "error_msg": "",
    "result": {
        "msg": "Attributes details updated successfully."