amazon-redshift-utils icon indicating copy to clipboard operation
amazon-redshift-utils copied to clipboard

Error if 'destinationTableForceDropCreate' is TRUE but table not present

Open davesgonechina opened this issue 4 years ago • 0 comments

When running with params set to force drop and recreate on a first-time run with a fresh target DB, this fails since it finds no table to drop.

https://github.com/awslabs/amazon-redshift-utils/blob/d2aa42a6ff872164613af027543efdfe5d517dbe/src/UnloadCopyUtility/util/tasks.py#L185-L189

Combining the conditional statements worked: if config_parameters['destinationTableForceDropCreate'] and self.target_resource.is_present():

I guess the other option is to not set params to force the drop/create, but there are situations where this could result in the opposite problem: some tables in the schema that should be recreated are not.

davesgonechina avatar May 05 '20 16:05 davesgonechina