Unique ID (Primary Key)

Is there a way I can change the primary key of a table?
I need to maintain relation between two columns and there are millions of records. All of these records will be fetched in via csv so I cannot do so much manual work of first uploading data to one table get all the object ids and then upload second data for second table. Is there a way around?
Thanks!

Hi @Mohid_Khurram ,

If CSV files already have columns with unique values which can be used as IDs then you can use those columns as primary keys. In such case you only need to correctly prepare files for import.

For example you have two files “users.csv” and “contacts.csv”. In “users.csv” there is a column with name “code” and at the same time “contacts.csv” have column with values from “code” column then you can bind values from those files during import process automatically.

Regards, Andriy

Hi @Andriy_Konoz Thank you for your response, is it same for one to one and one to many type of relationships?

@Mohid_Khurram ,

Yes, It should work the same way for “1:1” and “1:N” relations.
It will be better to create a test set of tables, fill them with some data, perform an export and check generated files.

Regards, Andriy

Yes, I tried it already, thanks!