microsoft / semantic-link-labs

Early access to new features for Microsoft Fabric's Semantic Link.
MIT License
178 stars 37 forks source link

Decimal data types only considered for (38,18) or (19,4) in "icon.py" #232

Closed Benjiman89 closed 3 weeks ago

Benjiman89 commented 3 weeks ago

Describe the bug When running "add_table_to_direct_lake_semantic_model" it errors when Lakehouse tables have decimal data types that are not either decimal(38,18) or decimal(19,4) due to the following code inside icons.py (https://github.com/microsoft/semantic-link-labs/blob/main/src/sempy_labs/_icons.py):

data_type_mapping = { "string": "String", "int": "Int64", "tinyint": "Int64", "smallint": "Int64", "bigint": "Int64", "boolean": "Boolean", "timestamp": "DateTime", "date": "DateTime", "decimal(38,18)": "Decimal", "decimal(19,4)": "Decimal", "double": "Double", "float": "Double", }

To Reproduce Run "add_table_to_direct_lake_semantic_model" it errors when Lakehouse tables have decimal data types other than decimal(38,18) or decimal(19,4)

Expected behavior No error message

Screenshots Image

m-kovalsky commented 3 weeks ago

Thanks for reporting. This will be fixed in the next release.

m-kovalsky commented 3 weeks ago

Fixed in 0.8.4.