Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error if 'destinationTableForceDropCreate' is TRUE but table not present #497

Open
davesgonechina opened this issue May 5, 2020 · 0 comments

Comments

@davesgonechina
Copy link

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.

if config_parameters['destinationTableForceDropCreate']:
logging.info('Dropping target table {tbl}'.format(tbl=str(self.target_resource)))
self.target_resource.drop()
if not self.target_resource.is_present():

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant