system.kanoa.quality.config.updateDataSource
Description
Updates an attribute datasource.Syntax
updateDataSource(attrInfo, userId)Parameters:
Returns:
Dictionary
| Parameter | Type | Required | Notes |
|---|---|---|---|
| attributeDataSourceId | int | No | e.g. 67 |
| attributeId | int | No | e.g. 3 |
| assetId | int | No | e.g. 5 |
| sourceTagPath | str | No | e.g. 'some tag path' |
| scaleFactor | float | No | e.g. 1.0 |
| ignoreZeroValues | bool | No | e.g. True |
| enabled | bool | No | e.g. True |
Code Examples
# Usage example
attr_info = {'attributeDataSourceId': 67, 'attributeId': 3, 'assetId': 5, 'sourceTagPath': 'some tag path', 'scaleFactor': 1.0, 'ignoreZeroValues': True, 'enabled': True}
modified_records, update_msg = system.kanoa.quality.config.updateDataSource(attrInfo=attr_info, userId=123)
if modified_records is not None:
print(f"Successfully updated {modified_records} records")
else:
print(f"Update failed. Error: {update_msg}")