system.kanoa.quality.config.updateDataSource
Description
Updates an attribute datasource in KanoaQDS.Syntax
updateDataSource(attrInfo, userId)- dict attrInfo - Dictionary, e.g., {'attributeDataSourceId': 67, 'attributeId': 3, 'assetId': 5, 'sourceTagPath': 'some tag path', 'scaleFactor': 1.0, 'ignoreZeroValues': True, 'enabled': True}
- int userId - User ID
- int modifiedRecords - Number of records modified during the update.
- str msg - Message indicating the result of the update.
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}")