def declare(self, context=None):
        """
        Use self.definition to declare the table in the schema.
        """
        try:
            sql, uses_external = declare(self.full_table_name, self.definition, context)
            if uses_external:
                sql = sql.format(external_table=self.external_table.full_table_name)
            self.connection.query(sql)
        except pymysql.OperationalError as error:
            # skip if no create privilege
            if error.args[0] == server_error_codes['command denied']:
                logger.warning(error.args[1])
            else:
                raise
        else:
            self._log('Declared ' + self.full_table_name)
def declare ( self , context = None ) : try : sql , uses_external = declare ( self . full_table_name , self . definition , context ) if uses_external : sql = sql . format ( external_table = self . external_table . full_table_name ) self . connection . query ( sql ) except pymysql . OperationalError as error : if error . args [ 0 ] == server_error_codes [ 'command denied' ] : logger . warning ( error . args [ 1 ] ) else : raise else : self . _log ( 'Declared ' + self . full_table_name )
Use self.definition to declare the table in the schema.