Skip to content

Instantly share code, notes, and snippets.

@boblannon
Last active August 29, 2015 13:57
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save boblannon/9793328 to your computer and use it in GitHub Desktop.
Save boblannon/9793328 to your computer and use it in GitHub Desktop.
all_records_that_are_new_or_changed_since_your_last_import = get_all_records_that_are_new_or_changed_since_your_last_import()
for record in all_records_that_are_new_or_changed_since_your_last_import:
found = find_the_record_in_your_old_data(record)
if not found:
add_the_record(record)
if found:
change_whatever_bits_of_the_record_are_different(record)
all_your_existing_data = get_all_your_existing_data()
for datum in all_your_existing_data:
if not in_source_data_any_longer(datum):
delete_datum(datum)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment