Good morning, everyone!
I’m about to tackle the most complex scenario we’ve encountered so far, and I could use your input.
-
API Call for Data Extraction: I need to call an API to extract data from a database. Unfortunately, this API performs a data dump with no available filters, so I’ll receive an unstructured sequence of events. For context, the data will list all events chronologically, with the most recent items appearing at the bottom.
-
Data Processing: I’ll need to read this data from the bottom up until I find a specific term from a set of possible terms (this could be the name of a specific meeting, which may vary). Once I locate the term, I’ll switch direction, reading back toward the end of the file to identify items marked by another set of terms (indicating meetings that included an election).
-
Capturing Document IDs: For the items flagged with an “election” term, I need to capture their document IDs and store them in a Google Sheet.
-
Expected Outcome: The goal is to generate a list of cleaned document IDs (stripping out any special characters or letters) that I can use later in a separate API call to download and store the corresponding PDF documents. But that’s a story for another day.
Any ideas, directions, or suggestions? I’m all ears!
Thanks, and have a fantastic week!