-
Notifications
You must be signed in to change notification settings - Fork 2
Add lookup() option to print unknown values.
#269
Conversation
|
Oh, you were too quick ;) I forgot to mention that there's a subtle behaviour change here: If a key is associated with a |
+1, sounds like an improvement! |
|
Heads up: I think this won't work across multiple records (unless a separate file is written for each record, using counter and/or record ID). I have yet to verify, but am pretty sure ;) (see also metafacture/metafacture-core#475) |
e4b4e66 to
356a5e7
Compare
|
The append option is a little bit unclear. If See here: #270 |
No, with append mode disabled, the file is overwritten for every
Exactly, that's the expected behaviour. (See also the unit tests.) |
anyway to make this a feature? |
What do you have in mind? A timestamp in the file name?
But you are going to add unknown values over time, aren't you? And then you'd delete the file. Otherwise, I would suggest to just rotate the file. |
I thought to overwrite just once, the first time the lookup is run.
Yes I am, but I have no direct control over the productive OERSI system. I cannot delete it by my own. The deletion process would be done by the infrastructure and the rotation need be prepared by @fsteeg then. |
We can try if that's the requirement. @fsteeg: Want to weigh in? |
If this is to much hastle. Let's go with this as it is for now, and evaluate later if this is a needed feature! One other thing. I tried to set id to name but the printed output has not the value of name in it: |
|
Also add `prefix` option.
|
Fixed |
That's fine with me, but we should keep in mind that such a change might not be possible in a backwards-compatible manner. |
I've opted to reuse the file-related options from
print_record(), the actual behaviour is triggered by a boolean flag (print_unknown).Resolves #212.
General issue: We can't differentiate between method options and a local (unnamed) map.