How to automatically link batch imported Entities with Accounts

I need to batch import over 10k entities/accounts and it works great. However, there doesn’t seem to be a way to bulk link the entity with the accounts. It doesn’t work even if the account name matches the Entity Type’s Account Name Template format. I wonder if there is a way to batch import entities with linked accounts.

Right now the only way to fix this seems to be via SQL:

UPDATE  Entities
SET		Entities.AccountId = Accounts.Id
FROM	Accounts
WHERE   Accounts.Name = Entities.Name

Note: This script only works if the Account Name exactly matches the Entity Name and the Account Name Template must be set to only Entity Name.

image