def AsyncBuildTables(self, proc): ''' build the tables in RedShift ''' try: ### ## first create the file so we can use it ### self.logger.info(self.moduleName + " - " + proc["processname"] + " - SQL tables starting.") sqlTableCreationScript = ApplicationBase.BuildTableCreationScriptTable( self, proc["sqlscript"], proc["processname"], templateFolder="sql", sqlFolder="sql") ### # now we create the table from the file created ### RedshiftUtilities.PSqlExecute(sqlTableCreationScript, self.logger) self.logger.info(self.moduleName + " - " + proc["processname"] + " - SQL tables created finished.") except: self.logger.exception(self.moduleName + "- we had an error in AsyncBuildCXR") raise
def AsyncBuildCXR(self, proc, basesql): ''' actually build the cross reference tables ''' try: self.logger.debug(self.moduleName + " -- " + "AsyncBuildCXR for " + proc["name"] + " starting ") ### ## first create the file so we can use it ### sqlTableCreationScript = ApplicationBase.BuildTableCreationScriptTable( self, basesql, proc["name"], templateFolder="sql", sqlFolder="sql") ### ## execute DDL so we now have the blank table ### RedshiftUtilities.PSqlExecute(sqlTableCreationScript, self.logger) self.logger.debug(self.moduleName + " -- " + "AsyncBuildCXR for " + proc["name"] + " finished ") except: self.logger.exception(self.moduleName + "- we had an error in AsyncBuildCXR") raise