Project

General

Profile

« Previous | Next » 

Revision 3323

sql_io.py: put_table(): NullValueException: Missing mapping for NOT NULL column: Raise error if there is no default input column to fill in the rows with. Missing mappings for required columns are a normal circumstance with path mappings (plantname, namedplace) because the mappings include intervening levels that may not be specified by the datasource. These mappings have default input columns for the intervening levels, so for them, this will continue to not be flagged as an error.

View differences:

lib/sql_io.py
437 437
            out_col, = e.cols
438 438
            try: in_col = mapping[out_col]
439 439
            except KeyError:
440
                log_debug('Missing mapping for NOT NULL column '+out_col)
440
                msg = 'Missing mapping for NOT NULL column '+out_col
441
                log_debug(msg)
442
                if default == None: on_error(SyntaxError(msg)) # required col
441 443
                remove_all_rows()
442 444
            else: ignore(in_col, None, e)
443 445
        except sql.DatabaseErrors, e:

Also available in: Unified diff