Instead of the storing the datasource, why not just add the entity identifier column with each document.
This identifier field would a fixed value column, probably embedded within the Query itself.
e.g. Use alias in sql e.g. SELECT 'APPLE' AS ENTITY_TYPE
You can use this field to determine what type of parsing is needed for the respective entity.