Hello
My last migration day was two weeks ago, and now I have 9 new product in M1 side. I try to import them today, but when I run delta, it does not import new products.
php -f bin/ubdatamigration run --step=5
[Processing][run] in step #5: Step #5 migration completed successfully
Total Data Migrated: 100%
How I can import only them ? I don’t want import or update any other items.
Is it possible to import by product id ? I don’t see these 9 products in the “ub_migrate_map_step_5”, last item is two week old product id.
Ari
8 answers
Hi there,
My last migration day was two weeks ago, and now I have 9 new product in M1 side. I try to import them today, but when I run delta, it does not import new products.
…
How I can import only them ? I don’t want import or update any other items.
You can try running delta migration in step #5 by running CLI with `startDate,
‘endDate’ params:
php -f bin/ubdatamigration run --step=5 --mode=update --startDate="START_DATE" --endDate="END_DATE";
For example enter `START_DATE`: --startDate=’2021-12-01′
Regards,
Mall.
Hello
I test it, but command update all product desciptions and short desciptions from id 1 to last id. I think startDate and endDate option does not work with products. Here is my command:
php -f bin/ubdatamigration run --step=5 --mode=update --startDate="2021-12-10" --endDate="2022-01-05";
I have tested this also few weeks ago, and we lost all M2 changes what we have done. How to fix this ?
Hi there,
I test it, but command update all product desciptions and short desciptions from id 1 to last id. I think startDate and endDate option does not work with products.
That is strange. Please run the following SQL in your M1 database and provide me the screenshots of the result you get:
SELECT * FROM `catalog_product_entity` WHERE `updated_at` >= '2021-12-10' AND `updated_at` <= '2022-01-05';
Also, please tell me to know what is the version of our module in your instance?
Regards,
Mall.
There is 221 sku’s which are updated between these days:
Showing rows 0 -- 24 (221 total, Query took 0.0007 seconds.)
SELECT * FROM `catalog_product_entity` WHERE `updated_at` >= ‘2021-12-10’ AND `updated_at` <= ‘2022-01-05’
Version in 3.2.6. I don’t want update all changed product data, only import 9 new products.
Hi there,
I need to create these products which created_at field is between these days:
Showing rows 0 — 8 (9 total, Query took 0.0035 seconds.)SELECT * FROM `catalog_product_entity` WHERE `created_at` >= ‘2021-12-09’ AND `created_at` <= ‘2022-01-06’
To handle that case you can try with steps:
Step 1: Open the PHP file at path: pub/ub-tool/protected/controllers/Step5Controller.php
and find to the code lines:
if ($this->endDate) {
$condition .= " AND updated_at <= '{$this->endDate}'";
}
and replace by code lines:
if ($this->endDate) {
$condition .= " AND updated_at <= '{$this->endDate}'";
}
$condition .= " AND created_at >= '2021-12-09' AND created_at <= '2022-01-06'";
Step 2: Once done, you run delta migration in step #5 by running the CLI command:
php -f bin/ubdatamigration run --step=5 --mode=update;
And tell me to know how it goes.
Regards,
Mall.
Hello
It is working better now. New products are created to M2 side and it does not change other product descriptions. But it makes some other changes to other tables. I don’t know is these necessary or not:
[Processing][delta] Step #5 migration completed with 9 record(s) in the 'catalog_product_entity' table.
[Processing][delta] Step #5 migration completed with 100 record(s) in the 'catalog_product_link' table.
[Processing][delta] Step #5 migration completed with 100 record(s) in the 'catalog_product_link' table.
[Processing][delta] Step #5 migration completed with 27 record(s) in the 'catalog_product_link' table.
[Processing][delta] Step #5 migration completed with 84 record(s) in the 'catalog_product_bundle_option' table.
[Processing][delta] Step #5 migration completed with 100 record(s) in the 'catalog_product_relation' table.
[Processing][delta] Step #5 migration completed with 100 record(s) in the 'catalog_product_relation' table.
[Processing][delta] Step #5 migration completed with 100 record(s) in the 'catalog_product_relation' table.
[Processing][delta] Step #5 migration completed with 100 record(s) in the 'catalog_product_relation' table.
[Processing][delta] Step #5 migration completed with 100 record(s) in the 'catalog_product_relation' table.
[Processing][delta] Step #5 migration completed with 41 record(s) in the 'catalog_product_relation' table.
Step #5 migration completed successfully
Hi there,
But it makes some other changes to other tables. I don’t know is these necessary or not:
Please do not worry as the update on the data relationship is about the parent product and associated children products on links of your products only (configurable, upsell, cross-sell… products).
Regards,
Mall.