on ‎2021 Apr 21 4:04 PM
Hello, everyone,
My team has the task to import/export data from a source commerce system (running CCV1) into a target commerce system (running on on premisse).
We've evaluated the options to do this and we've discarded using any database level ETL sort of tool.
Our plan is to use the Script Generator tool, available in Backoffice, to generate the migration ImpEx scripts.
The script generation has the option to export by PKs or to export by Reference.
The difference, obviously, is that by Reference the PKs will be created again in the target system.
The Export/Import by PKs seems a lot easier as the import process becomes a matter of only importing in the right order.
However, I'm afraid that, at some point or intermittently, when new instances of a type are created, the target system generates a PK for the new record that was already imported to the base.
Do you think this problem can happen? Or any other problem? Do you have any recommendation to make this process easier?
Best Regards!
Request clarification before answering.
When you migrate data, don't import using PKs. PKs for the same data can be different in different environments/servers.
Use the unique codes or composite keys that idenfies a record. e.g. code and catalogVersion for Product, and uid for Employee.
INSERT_UPDATE Employee;uid[unique=true];name
;emp1;EmployeeName1
;emp2;EmployeeName2In this example, the code (or unique key) for the Employee is the uid. In all enviroments, you will refer to the records by their codes (in this case, the uid). When Hybris imports them, it's possible that Hybris will generate different PKs (in different environments) for the same code.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
acabral I updated the Answer, although I'm not sure it's clear. When you export the data, you can include the PK in the export. But, don't use the PK as the unique key. Use the code or some other set of attributes that uniquely identifies the record.
| User | Count |
|---|---|
| 4 | |
| 2 | |
| 1 | |
| 1 | |
| 1 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.