cancel
Showing results for 
Search instead for 
Did you mean: 

How to generate a unique id in snaplogic

Sowmya_Rayavara
New Contributor III

Hi Team,

Can you please let me know how to generate a unique ld like the below one in snaplogic.

1553020781234-4901709987102371234-03202019DFF456F123

Thanks in Advance!

22 REPLIES 22

Divya
New Contributor

You can use pipe.ruuid function. It is unique for each run I assume.

smudassir
Employee
Employee

If user wants to generate unique id once in pipeline then pipe.ruuid is sufficient. However, if they want multiple unique ids then I would say use script snap with python and use uuid library to generate.

vincenr
New Contributor III

I saw your comment about generating multiple unique ids (GUID) in April of 2019. I’m using a REST POST to send a SQL query to another system, which works fine except that I haven’t figured out how to generate a unique GUID for every row in my query? When I insert Math.randomUUID() as one of the columns it generates the same GUID for every single row in my results, not different UUIDs, one for each row. How can I do this? A call to a user defined function? How would I implement that, if a user defined function is the answer?

tlikarish
Employee
Employee

There is UUID function you can call using the expression language.