redcap-tools / PyCap

REDCap in Python
http://redcap-tools.github.io/PyCap/
MIT License
169 stars 80 forks source link

Pulling records filtered by date modified/created #241

Closed rmcbarnett closed 2 years ago

rmcbarnett commented 2 years ago

This isn’t an issue per se but a question. How would I pull the only the new and modified Records from a project?

Is this functionality available?

pwildenhain commented 2 years ago

Yeah we don't have gitter, discord, or any other chat app so this is really the best place for questions (for now)

You can use the date_begin and date_begin parameters in the export_records method to filter records you pull by the date they were created.

However if you also want to pull any records that were modified, then you're better off using a webhook that pings a server any time a record is added/saved within the project.

And as a purely personal opinion, I think just doing a full trunc/reload of the data each day is the best option for most REDCap data pulls. Export all the records and completely replace the existing REDCap data in the target database

pwildenhain commented 2 years ago

Hopefully the advice was helpful 😄