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

koryknick
Employee
Employee

Iโ€™m not familiar with your exact details, but attached is a sample pipeline that demonstrates the flow as I understand you want to do it.
Generate Guid per row_2022_07_05.slp (6.0 KB)

vincenr
New Contributor III

So does it somehow add the UUID to every row in the response from the POST?

Yes - the Mapper would add the value to the returned results.

With that said, depending on how the API returns the results, there may be additional steps before the Mapper to add the GUID value. For example, if the API returns an array of values in the response, you may need to use a JSON Splitter to split the array into individual documents.

vincenr
New Contributor III

Hereโ€™s what Iโ€™m doing:

image

I get all the rows etc and sent to csv successfully. Iโ€™m just not sure how to add the UUID so that a new one is generated for every row (inside the splitter) or some other way?

koryknick
Employee
Employee

Add a Mapper snap as shown between the JSON Splitter and CSV Formatter:
image