The Magento Sample Data product database has ~150 products in it. I’m using a web service that allows a maximum content-length of 5MB (5242880 bytes). When filtered and encoded in their format (avro), the entire product database is 87858 octets, or about 1/59 of this max.
I’ve been tasked with writing a pagination feature for my application that should request product information in chunks if the existing product database would be larger than this threshold. Is there any reasonably efficient way to inflate the number of products in the sample data in a repeatable way? Looking at mysql, I see 68 tables whose names start with catalog_product_…, plus I’d have to prevent product id, sku and primary key from overlapping. So that’s daunting, but so is the idea of exporting the product database to Excel, making changes there, and then importing the much larger data.
Is there a better approach or another way I should be thinking about this?
You could install ApiImport.
Simply edit
.modman/ApiImport/tests/benchmark_import_api.phpto import as many products as you like. Preferably you’d set USE_API to false for faster results. You should probably also comment out the customer entity so that it doesn’t flood your install with a bunch of customers.Afterwards you can simply run the same file from the command-line.