microsoft / Analysis-Services

Git repo for Analysis Services samples and community projects
MIT License
605 stars 416 forks source link

v5.1.3 - All model measures appearing as Variant data type #297

Closed MuddasarM closed 3 weeks ago

MuddasarM commented 2 months ago

Version 5.1.3 schema compare detects differences between 2 models which version 5.0.44 did not detect.

5.1.3 sees one of the models to have variant data type for all its measures. Actual model does not have variant data type for these measures and 5.0.44 and earlier are able to see the model metadata in its true state with the correct data types.

Using the Update feature, tried updating the measures from the model which was showing correct data types, but despite displaying that it had succeeded, subsequent schema compare output returned the differences again.

Have re-installed 5.0.44 and schema compare is returning no differences between the models again. Something up with 5.1.3. Please investigate.

christianwade commented 2 months ago

Thanks for the feedback. You can switch to TMSL diff in the options dialog to get the same behavior as before without reverting to an old version.

Can you can share the TMDL snippet or a screenshot? This is likely a TMDL serialization issue, which I can forward to the AS engine team once confirmed.

otykier commented 2 months ago

@MuddasarM have you recently added a calculation group to the model? In some cases, calculation item expressions that change the data type of the resulting value, causes all measures in the model to have their data type decay to "Variant". This shouldn't change anything for the end-users of your model, however. https://community.fabric.microsoft.com/t5/Desktop/DAX-Measure-is-always-variant-type-even-when-it-shouldn-t-be/td-p/1236017

MuddasarM commented 2 months ago

@christianwade Thanks for heads up on switch to TMSL option. Example of variant type that should be int64:

image

MuddasarM commented 2 months ago

@otykier the model already had a calculation group, and the previous version of ALM Toolkit wasn't decaying all the measures to type variant as a result. Only an issue in latest version. But good to know, thank you.

MuddasarM commented 2 months ago

@christianwade there are also cases where it wants to make the list of columns in a table definition ascending alphabetical, but again, trying to perform this update results in nothing actually changing:

image

christianwade commented 2 months ago

@MuddasarM , the ordering issue - internally referred to as spurious diffs - is a known issue with TMDL serialization and affects more than ALM Toolkit. It is documented as a known issue at the bottom of the ALM Toolkit doc. https://github.com/microsoft/Analysis-Services/blob/master/AlmToolkit/Semantic%20Model%20Comparison%20and%20Merging%20with%20ALM%20Toolkit.pdf

We have a design to fix it, and the AS team is committed to doing it, but we don't have a timeline yet. In the meantime, if this is a big enough issue, you can switch back to TMSL based diffs by changing the Options setting as described in the doc - and that should result in equivalent diffs to the previous version.

christianwade commented 2 months ago

Regarding the datatype being serialized by default and causing the variant != int64 issue, that has been fixed by the AS team and will be rolling out in a forthcoming AMO update - after which ALM Toolkit can pick up the latest client libraries and release a version with the fix.

MuddasarM commented 6 days ago

@christianwade Can confirm, datatype serialization issue is now fixed. But spurious diffs is still an issue (but not too painful).

christianwade commented 6 days ago

@christianwade Can confirm, datatype serialization issue is now fixed. But spurious diffs is still an issue (but not too painful).

Thanks for the update!