Revision 4628
Added by Aaron Marcuse-Kubitza over 12 years ago
join | ||
---|---|---|
26 | 26 |
only_one = opts.env_flag('only_one', False, env_names) |
27 | 27 |
# Uses only columns 0 and 1 of map_1 |
28 | 28 |
map_1_core_only = opts.env_flag('map_1_core_only', False, env_names) |
29 |
# Passes through terms with no input mapping or no join mapping |
|
30 |
passthru = opts.env_flag('passthru', False, env_names) |
|
29 | 31 |
# Turns off "No input mapping" errors |
30 |
quiet = opts.env_flag('quiet', False, env_names) |
|
32 |
quiet = passthru or opts.env_flag('quiet', False, env_names)
|
|
31 | 33 |
try: _prog_name, map_1_path = sys.argv |
32 | 34 |
except ValueError: usage_err() |
33 | 35 |
|
... | ... | |
51 | 53 |
writer.writerow(maps.merge_mappings(map_0_cols, map_1_cols)) |
52 | 54 |
for row in reader: |
53 | 55 |
def set_error(msg): |
54 |
row[1] = '' |
|
56 |
if not passthru: row[1] = '' |
|
57 |
elif row[1] == '': row[1] = row[0] # no input mapping |
|
55 | 58 |
if not quiet: |
56 | 59 |
warnings.warn(UserWarning(msg)) |
57 | 60 |
row[2] = '** '+msg+' ** '+util.list_setdefault(row, 2, '') |
Also available in: Unified diff
join: Added new passthru mode which passes through terms with no input mapping or no join mapping