Primary Keys for a New Table created in a Transformation task

Hello Team,

I’m creating a new Table in one of the Transformation Tasks of my data job. While creating the table, I want to define the primary keys.
Can you please guide me, how to do that.
Thank You in advance.

Warm Regards,
Jayanta Borkakoti

Hi Jayanta,

when creating a table in the transformation, you don’t need to define a primary key.
Besides that , is there any specific reason why you would like to create one?

Best regards,
Viana

1 Like

Hello Viana,

Thanks for answering my query.
Actually our team is creating the P2P dashboards for our Customer and we are not connecting via Cloud or to a On Premise System. We are getting the CSV files from Customer and through transformation uploading the same to the activity table.
Now, we have a requirement to create a table in the Transformation task similar to the table of the Source system. As the table in the source system is having primary keys, I also wanted to add the same to the table in the transformation task.

Just inquisitive, if we don’t need to define any primary keys then there will potential duplicate records for those set of field values.?
Also in Celonis, if we do not define primary keys, then my understanding is that it looks for uniqueness of all the fields of the table. Just correct me if I’m wrong here.

Thank You in advance.

Warm Regards,
Jayanta

Hi Jayanta,

to answer your questions:

Just inquisitive, if we don’t need to define any primary keys then there will potential duplicate records for those set of field values?

Yes, it is technically possible to have duplicate rows, but from my implemenation experience that happens in very less cases. If there are duplicates, you would later also get a data model load error which tells you that there are duplicates in the respective table.

Also in Celonis, if we do not define primary keys, then my understanding is that it looks for uniqueness of all the fields of the table. Just correct me if I’m wrong here.

Could you specify what you exactly mean by “uniqueness of all the fields”?

Best regards,
Viana

1 Like

Hello Viana,

Thank You for your inputs.
“Also in Celonis, if we do not define primary keys, then my understanding is that it looks for uniqueness of all the fields of the table. Just correct me if I’m wrong here. -Could you specify what you exactly mean by “uniqueness of all the fields?”

In the above cited statement, by uniqueness, I meant that, If for example a Table has 10 fields, a record containing different values across the 10 fields will be considered as unique and another similar record having the similar 10 fields of data cannot be inserted.

Hope I’m able to make it clear.

Warm Regards,
Jayanta