How to create a column with a unique ID value

Jeancarlos
Jeancarlos Registered Posts: 14 ✭✭✭

Hi,

I have 4 flow with different data information but with several companies in all flows.

How can I create a column with a unique ID for each company? This way I can merge the flows together based on the ID.

Thanks

Answers

  • Turribeach
    Turribeach Dataiku DSS Core Designer, Neuron, Dataiku DSS Adv Designer, Registered, Neuron 2023 Posts: 2,236 Neuron

    Why can't you use company name as the ID?

  • Jeancarlos
    Jeancarlos Registered Posts: 14 ✭✭✭

    @Turribeach

    Because sometimes the company have sub-companies, or they have a name change because they got bought out etc.

  • LouisDHulst
    LouisDHulst Dataiku DSS Core Designer, Dataiku DSS ML Practitioner, Neuron, Registered, Neuron 2023 Posts: 54 Neuron

    You could use the company string to create a hash, but you're going to run into the same issues. If you have a "Company" column and a "SubCompany" column you could also just concat the two to get a unique string.

    Do you want the ID to be unique for each company, or for each sub-company? If company A gets bought out by company B, should the unique ID be updated to reflect that?

    Ultimately this is going to depend on the design of your database, how new data comes in etc.

  • Jeancarlos
    Jeancarlos Registered Posts: 14 ✭✭✭

    @LouisDHulst

    I would want to create an ID for the top-level company.

    Example:

    If company A has an ID #1234 and buys company B. Now company B will have the same ID #1234. The same if there is a sub-company C under A or B, then it will have ID #1234. I would say like grouping them into a single ID.

    Thanks,

Setup Info
    Tags
      Help me…