SQL Targets: Processing of activate_version record fails if table does not yet exist
Summary
SQLSink.activate_version assumes that the destination table exists. The first time the pipeline is executed this may not be true, however, since the table will not be created until the first process_batch call.
Steps to reproduce
Create a pipeline where the tap produces activate_version records (I used tap-mysql) and the target relies on the SDK to handle activation version records. I discovered this while developing my own target but I was able to reproduce it using the SDK-based version of the SQLite target.
What is the current bug behavior?
The pipeline will fail with a 'table does not exist' error caused by the DELETE FROM that SQLSink.activate_version executes.
What is the expected correct behavior?
SQLSink.activate_version should do nothing if the table doesn't exist.
Possible fixes
MR incoming