Forum Discussion
joeparkinson
2 years agoHelper I
Dataverse Synapse Link Choice Column Names
Hey, I've integrated dataverse into fabric using Synapse link to automatically bring in all the tables into Fabric. However, the choice columns in the dataverse only return the integer ID of the ...
mscottsewell
2 years agoMicrosoft Employee
SELECT [Base].accountid customerid
, 1 AS [CustomerEntityType]
, [Base].name [Customer Name]
, [Base].parentaccountidname [Parent Account]
, [Base].address1_city [City]
, [Base].address1_stateorprovince [State or Province]
, [Base].address1_country [Country]
, [Base].ownerid ownerid
, [Base].owneridname [Customer Owner]
, ISNULL(account_industrycode.value,'N/A') [Industry]
, [T].name AS [Territory]
, [T].[parentterritoryidname] [Parent Territory]
, ISNULL([T].[manageridname], 'No Territory Manager') [Territory Manager]
, [T].territoryid
, [Base].accountnumber AS [Customer ID]
, account_businesstypecode.value [Business Type]
FROM [account] AS Base
LEFT OUTER JOIN [territory] AS T
ON T.territoryid = Base.territoryid
LEFT JOIN [stringmap] AS account_industrycode
ON account_industrycode.langid = 1033
AND account_industrycode.objecttypecode = 'account'
AND account_industrycode.attributename = 'industrycode'
AND account_industrycode.attributevalue = [Base].industrycode
LEFT JOIN [stringmap] AS account_businesstypecode
ON account_businesstypecode.langid = 1033
AND account_businesstypecode.objecttypecode = 'account'
AND account_businesstypecode.attributename = 'businesstypecode'
AND account_businesstypecode.attributevalue = [Base].businesstypecode
WHERE
[Base].IsDelete IS NULLThis is the pattern I use - I only join on the values that I need at runtime since those labels can change independently of the record or I might want a different language represented in the report.
mscottsewell
2 years agoMicrosoft Employee
Also - I wrote up an example for getting the label values for multi-select fields.
Unpacking a Dataverse Multi-Select field in Fabric. | LinkedIn