Join us for an expert-led overview of the tools and concepts you'll need to pass exam PL-300. The first session starts on June 11th. See you there!
Get registeredJoin us at FabCon Vienna from September 15-18, 2025, for the ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM. Get registered
Hi,
Since Fabric Warehouse does not support the IDENTITY functionality on a column for Surrogate key generation, is anyone aware of any alternate practical method to generate surrogate keys apart from the NEWID() function and MAXID + ROW_NUMBER() approach ?
Solved! Go to Solution.
Hi @VirajD ,
One other approach I've seen used in Fabric is creating a hash of your data and using that as a surrogate key.
For example if you have a PersonID, you could do this:
HASHBYTES('SHA2_256', CONVERT(varchar(800), PersonID))
Depending on your definition, it's not a surrogate key because it's derived from your existing data.
If this isn't a viable option, I haven't seen any alternatives to date beyond the ones you've ruled out. You'd likely need to either build your own solution to create a surrogate or otherwise find another option.
Hi @VirajD,
As we haven’t heard back from you, we wanted to kindly follow up to check if the solution provided for your issue worked? or let us know if you need any further assistance here?
Thanks,
Prashanth Are
MS Fabric community support
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly and give Kudos if helped you resolve your query
The solution provided is accepted.
Hi @VirajD ,
One other approach I've seen used in Fabric is creating a hash of your data and using that as a surrogate key.
For example if you have a PersonID, you could do this:
HASHBYTES('SHA2_256', CONVERT(varchar(800), PersonID))
Depending on your definition, it's not a surrogate key because it's derived from your existing data.
If this isn't a viable option, I haven't seen any alternatives to date beyond the ones you've ruled out. You'd likely need to either build your own solution to create a surrogate or otherwise find another option.
This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.
User | Count |
---|---|
2 | |
1 | |
1 | |
1 | |
1 |
User | Count |
---|---|
5 | |
3 | |
3 | |
3 | |
2 |