system.kanoa.quality.config.getTolerances
Description
Returns attribute tolerances based on the passed parameters.Syntax
getTolerances(paramsDict)Parameters:
Returns:
Dictionary
Parameter | Type | Required | Notes |
---|---|---|---|
enabled | bool | No | e.g. True |
attributeId | int | No | e.g. 1 |
attributeName | str | No | e.g. 'ph' |
path | str | No | e.g. 'Chemical Tanks\ph' |
attributeToleranceId | int | No | e.g. 3 |
assetId | int | No | e.g. 2 |
itemId | int | No | e.g. 54 |
itemClassId | int | No | e.g. 34 |
itemSetId | int | No | e.g. 6 |
Code Examples
# Usage example
tolerance_params = {'enabled': True, 'attributeId': 1, 'attributeName': 'ph', 'path': 'Chemical Tanks\ph', 'attributeToleranceId': 3, 'assetId': 2, 'itemId': 54, 'itemClassId': 34, 'itemSetId': 6}
tolerance_data = system.kanoa.quality.config.getTolerances(paramsDict=tolerance_params)
# Accessing data in the dataset
for row in tolerance_data:
print(f"Attribute Tolerance ID: {row['attributeToleranceId']}, Attribute Name: {row['attributeName']}, Path: {row['path']}, Enabled: {row['enabled']}")