Is it possible to get ADF to delete a field in a table before it is sent to Sink location?
For example if I have a Lookup activity that discovers a field in a table is it possible to for the copy activity to delete that field in the table before sending the table to sink?
You can add the below sql script in the pre-copy script in the sink settings of copy activity:
IF EXISTS (SELECT 1
FROM INFORMATION_SCHEMA.COLUMNS
WHERE TABLE_NAME = 'Table1'
AND COLUMN_NAME = 'col1'
AND TABLE_SCHEMA='Schema1')
BEGIN
ALTER TABLE Table1
DROP COLUMN col1
END