1

I want to know what are the tables being inserted while import product in magento2.

or what are the main table to be inserted for showing products in home page( don't think big. just to display in UI)

I have 1 Million of data, and I can't upload a file which is more than 2mb.

It is not possible to split my file and insert.

I can create insert into ... query from csv file if I know the table names and its relations.

can anyone know, please answer me

1 Answer 1

1

vendor/magento/module-catalog-import-export/Model/Import/Product.php

This is the class who is responsible for importing product. Following method is responsible for importing product.

/**
 * Save products data.
 *
 * @return $this
 */
protected function _saveProductsData()
{
    $this->_saveProducts();
    foreach ($this->_productTypeModels as $productTypeModel) {
        $productTypeModel->saveData();
    }
    $this->_saveLinks();
    $this->_saveStockItem();
    if ($this->_replaceFlag) {
        $this->getOptionEntity()->clearProductsSkuToId();
    }
    $this->getOptionEntity()->importData();

    return $this;
}

When you go to $this->_saveProducts() you can discover, there create 4 types array. one for catalog_entity table, one for attributes table, stock and media.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.