Similar to T397923 for `categorylinks`, the `imagelinks` MediaWiki table is being normalized in T299953 and we should adapt to it.
In addition to Sqoop, it's possible that Commons Impact Metrics also depends on this table directly.
I think T415786 is the ticket that tracks the actual migration in the production database.
We need to do the following:
[x] Add il_target_id to Sqoop's imagelinks table definition in python/refinery/sqoop.py
[x] Drop il_to column from Sqoop's imagelinks table definition by setting value to null
[x] Add table linktarget definition to python/refinery/sqoop.py
[x] Add table linktarget to Sqoop's Puppet script invocation definition
[x] Update the CREATE HQL script of mediawiki_imagelinks with the new columns added
[x] Add CREATE HQL script for new table wmf_raw.mediawiki_linktarget
[x] Run alter table statement on table wmf_raw.mediawiki_imagelinks in Hive to add two new columns (ALTER TABLE ADD COLUMN...)
[x] Create table wmf_raw.mediawiki_linktarget in Hive
[x] Add table wmf_raw.mediawiki_linktarget to mediawiki history load DAG in airflow
[x] Add table wmf_raw.mediawiki_linktarget to bin/refinery-drop-mediawiki-snapshots script