auto-save id number for each data record. How is it done?

Hi; I want to create an id number for each record in the table created for the data collected.

I want to add the id as a separate column. There should be different / unique id for each data. for example: Rec112545, Rec112546 …

Is there a sample workflow? or how can i do.

But the most important point here is that the id that was created before should not be rebuilt. In other words, when I run the workflow today, the given id number should be able to continue in order when the workflow is reset, and the id should not be reset.

hi @umutcankurt,

maybe you could concat your whole row and hash it?


however there might appear cases with non unique keys…

Else maybe could you give an overview what is the background for your question?
I cannot quite grasp what the problem is?

To you process a file and later reuse it?
Why is the same id relevant for a new execution?
Does your data not contain any unique identifier oder combined column key?

2 Likes

Hi; @AnotherFraudUser
Thanks for the answer, there are workflows for the resources I collect data everyday. I restart workflows every day with resret.

I need to create a unique id ID for each data collected. But since I resert the workflows every day, the id node that I will add to the workflow should not be reset from the last day it was left the day before.

Otherwise it returns the same starting id number every day.

The data you collected yesterday will be collected today too or you have to increment (concatenate) the yesterday data with the data you collect today?

To avoid or decrease the possibility to appear same hash values one solution may be to calculate more hash values with different algorithms and concatenate them or concatenate hash value with the date and time of creation

2 Likes

Hi; @andrejz

"The data you collected yesterday will be collected today too or you have to increment "… Yes, I am likely to collect the data I collected yesterday today. However, while transferring the data to the database, the original connection link is compared and the duplicate records do not occur. (control is automatic.)

But if id starts all over again this would be a problem. Because work flow restarts every day by resetting. It should be id is unique in the database.

think like this; even if the workflow is reset, it’s like an independently working sequence. and gives a number for each record. But the number sequence does not reset at all. And it continues from the regular number order every day.

I am not sure if I really understand your problem … I think you have to read the yesterday data, concatenate it to the today data (which must be processed to add a ID) and save the result (to some temp table) so it is available tomorrow as the yesterday data :roll_eyes:

I put together a workflow which counts the rows of “yesterday data” and continue in the “today table” from where the “yesterday table” ends and concatenate them.

Count rows.knwf (44.1 KB)

Hope this helps you in some way

3 Likes

Thanks for the answer and sample workflow. He gave me the idea to think and develop.

:wink: :+1:

1 Like

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.