Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started

Reply
bexy
Frequent Visitor

How can I generate sequentially increasing row numbers for a table within Fabric Datawarehouse?

 
2 ACCEPTED SOLUTIONS
v-nikhilan-msft
Community Support
Community Support

Hi @bexy 
Thanks for using Fabric Community.
We can use a work around technique in data warehouses to assign a unique identifier to each row of a table.
I have created the repro:

vnikhilanmsft_0-1715654887952.pngvnikhilanmsft_1-1715654905795.png

 

vnikhilanmsft_2-1715654922114.png

 


For more information please refer to this document:
Generate unique identifiers in a warehouse table in Microsoft Fabric - Microsoft Fabric | Microsoft ...

Hope this helps. Please let me know if you have any further questions.

View solution in original post

arpost
Advocate V
Advocate V

@bexy, one thing of which to be aware, though, is this only works if you aren't running multiple scripts that are inserting to the same table. If you have two scripts that insert into the same table around the same time, the workaround risks creating duplicate ID numbers since both scripts would be starting from the same MAX.

 

There's an idea for people to upvote for Microsoft (upvote link) to add an official identity feature to Fabric so we don't have to use the workaround. The good news is a Microsoft person replied and stated this is planned for 2024, though I haven't seen it on any release plans yet.

View solution in original post

3 REPLIES 3
arpost
Advocate V
Advocate V

@bexy, one thing of which to be aware, though, is this only works if you aren't running multiple scripts that are inserting to the same table. If you have two scripts that insert into the same table around the same time, the workaround risks creating duplicate ID numbers since both scripts would be starting from the same MAX.

 

There's an idea for people to upvote for Microsoft (upvote link) to add an official identity feature to Fabric so we don't have to use the workaround. The good news is a Microsoft person replied and stated this is planned for 2024, though I haven't seen it on any release plans yet.

bexy
Frequent Visitor

@v-nikhilan-msft  thanks it is helpful

v-nikhilan-msft
Community Support
Community Support

Hi @bexy 
Thanks for using Fabric Community.
We can use a work around technique in data warehouses to assign a unique identifier to each row of a table.
I have created the repro:

vnikhilanmsft_0-1715654887952.pngvnikhilanmsft_1-1715654905795.png

 

vnikhilanmsft_2-1715654922114.png

 


For more information please refer to this document:
Generate unique identifiers in a warehouse table in Microsoft Fabric - Microsoft Fabric | Microsoft ...

Hope this helps. Please let me know if you have any further questions.

Helpful resources

Announcements
Europe Fabric Conference

Europe’s largest Microsoft Fabric Community Conference

Join the community in Stockholm for expert Microsoft Fabric learning including a very exciting keynote from Arun Ulag, Corporate Vice President, Azure Data.

Expanding the Synapse Forums

New forum boards available in Synapse

Ask questions in Data Engineering, Data Science, Data Warehouse and General Discussion.

RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

Ask questions in Eventhouse and KQL, Eventstream, and Reflex.

MayFBCUpdateCarousel

Fabric Monthly Update - May 2024

Check out the May 2024 Fabric update to learn about new features.