INSERT INTO hostedby_map (_dnet_resource_identifier_, oa_source_id, entry, datasourceid)
	SELECT
		p.id || '@@' || p.oa_source_id,
		p.oa_source_id,
		p.id,
		d.id
	FROM dsm_datasources d, pangaea_temp_journals p
	WHERE
		d.collectedfrom = 'driver______::1790119e-d281-4b7a-aedf-866d1d853a07' AND d.issn IS NOT NULL AND d.id LIKE 'doajarticles::%' AND p.issn = d.issn
		AND
		(p.oa_source_id, p.id) NOT IN
		(SELECT
			 oa_source_id,
			 entry
		 FROM hostedby_map);


INSERT INTO hostedby_props (_dnet_resource_identifier_, key, value)
	SELECT
		p.id || '@@' || p.oa_source_id,
		'issn',
		p.issn
	FROM dsm_datasources d, pangaea_temp_journals p
	WHERE
		d.collectedfrom = 'driver______::1790119e-d281-4b7a-aedf-866d1d853a07' AND d.issn IS NOT NULL AND d.id LIKE 'doajarticles::%' AND p.issn = d.issn
		AND
		(p.id || '@@' || p.oa_source_id, 'issn', p.issn) NOT IN
		(SELECT
			 _dnet_resource_identifier_,
			 key,
			 value
		 FROM hostedby_props);
