-
Notifications
You must be signed in to change notification settings - Fork 261
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[BUG] Asset Manager OMAS updateSchemaAttribute does not update dataType #7147
Comments
In the debugger I am comparing the createSchemaAttribute flow with the updateSchemaAttributeFlow of SchemaExchangeHandler.
for update line 1457
In both cases the schemaAttributeBuilder contains a newClassification with the appropriate DataType value. I notice that in the create case the schemaAttributeBuilder is passed down to the generic handler. In the update case At line 1773 in the update code path , the code creates a new schemaAttributeBuilder -which has lost the embeddedType classification I am thinking of adding an overloaded version of updateSchemaAttribute method that passes the builder down, then use that. Does this sound reasonable @mandy-chessell ? |
Why create an overloaded method rather than updating the existing method? Which circumstances would you not want the builder? |
@mandy-chessell ok - I will add another parameter to this method. |
My question before was a genuine question since I had not looked at the code. I have now looked at the code and I agree that an overloaded method seems a better idea. There are currently two styles of update method. The method being called only updates the schema attribute entity and not its classification. There is another method (line 1690), used when we know that the type is a primitive - such as a database column - (but not the case in Asset Manager). This passes all of the properties as individual parameters. It has the code to update the classification too. So for Asset Manager we need a third style that takes the schema attribute builder (with the schema type builder embedded) and uses them to do the updates. |
@mandy-chessell I have put in a smaller targeted fix that works that just does applies the classifications after the instance properties are updated. I hope this is ok for now - it solves my issue. I will raise another issue for the bigger change |
#7147 Update schema attribute in asset manager , changed to ensure that dataType is updated
Is there an existing issue for this?
Current Behavior
If I issue a createSchemaAttribute in the SchemaExchangeRestServices, I supply SchemaAttributeRequestBody, this contains a schemaType that contains the datatype. For me this was a primitive schema attribute called age with a datatype called integer.
If I then issue an updateSchemaAttribute to the SchemaExchangeRestServices, I supply SchemaAttributeRequestBody with. schematype that has a datatype "string", the datatype is not updated.
Expected Behavior
Expect that the datatype is updated.
Steps To Reproduce
call updateSchemaAttribute to change the datatype. This can be done by using the Sample Lineage connector.
Environment
Any Further Information?
No response
The text was updated successfully, but these errors were encountered: