mysql database writer,create UUID

hello everyone
I want to add data into an exsiting table in mysql database.But the table has an item “UUID”.
So how can I create the UUID in KNIME?
Thank you!

Hi @vzzw

Although I don’t believe KNIME has a node to generate UUIDs for you automatically, there are several other ways you might do it:

  • package UUID() in R using the R Snippet node
  • import uuid in Python using the Python Snippet node
  • online tools ( that create files you could then import

Then it’s just a matter of combining the UUID with the rest of your dataset.

thank you four your help!
I 'm not good at R or Python,could you show me some clear details,please?

Sure, here’s a workflow that uses an R Snippet.



GenerateUUIDExample2.knwf (11.5 KB)


That’s great.It worked! I have installed python3.7 and found some code,such as:
import uuid
print uuid.uuid1()
But it dosn’t work. So how to do it with"python snippet"? I’m a beginner and very interested in it,thanks again :slight_smile:

Here’s an updated workflow that should work, assuming your Python environment is setup to work with KNIME properly (more on that here:

GenerateUUIDExample3.knwf (13.6 KB)


Thank you very much!

1 Like