A basic solution seems to be to set the
url_key column to the product name.
This will run through
\Mage_Catalog_Model_Attribute_Backend_Urlkey_Abstract::beforeSave which automatically formats the URL key properly (removing spaces and so on).
I would actually expect
\Enterprise_Catalog_Model_Product_Attribute_Backend_Urlkey::beforeSave to be used during the export, because we are on Enterprise, which is not the case.
Even if the Enteprise-only method would be called during import, this would not work, because it checks the database for duplicate URL keys - which is not yet updated during that stage of the import.
Solution: After importing, detect missing URL keys using:
$urlKeyMissing = Mage::getModel('catalog/product')->getCollection()
->addAttributeToFilter('url_key', array('null' => ''), 'left');
and update these products (load, setDataChanged, save).
In addition I am setting the following in the
config.xml of my import module (the standard import-export is disabling the URL key checks)