-
Notifications
You must be signed in to change notification settings - Fork 148
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
cli: adds replace option #1887
cli: adds replace option #1887
Conversation
f931b29
to
a6358cc
Compare
@ioannistsanaktsidis @pamfilos Tested the PR locally, works nicely, here are some observations for improvements: 1. Repetitive uploads. (important) if you load a file that has 100 records, say, and it fails in the middle, and you fix a problem for record number 50, then you cannot reload the file again, because:
You can try with:
that you would interrupt in the middle after say only 6 records are loaded. => Can you add an insert-or-replace option, for example allow multiple values The wanted behaviour is:
We basically need a new CLI option to express the 3rd scenario. Allowing multiple values 2. Output messages. (cosmetics) You could catch the exception
for the two "fail" situations in the above table. You could also introduce informative messages:
for the other situations in the above table, when things are OK and when the user used 3. Non-record content. (future outlook) For now, doing this for records is enough. For future, it would be good to think about doing this for other fixtures, such as "docs", so that one could log into the PROD machine and upload only the latest given news document, without disturbing the others. Noting this down just for completeness; not necessary to address this now as part of this PR! |
a6358cc
to
10d737b
Compare
@tiborsimko updated ! You can check now if it fits our case :) I think it covers all your comments. |
* Closes cernopendata#1836. Signed-off-by: Ioannis Tsanaktsidis <[email protected]>
10d737b
to
80c63ca
Compare
@ioannistsanaktsidis Great, everything looks OK! |
Signed-off-by: Ioannis Tsanaktsidis [email protected]