Domdhi logoDOMDHI.OS
BACK_TO_COURSE

Pulling Data In

Write the Brief, Then Let AI Build

"Connect These Two" Is Not a Brief

Give AI that and it builds the happy path: one page, no errors, perfect network. It demos great. Then it quietly drops half your data on a Tuesday.

Say what has to be true when it's done:

Build a script that pulls calls from [API] into [database].
Use the docs table we checked. Read-only key, from an environment variable.

It must:
- get every page, and fail loudly if a page can't be read
- wait and retry on 429, 5xx and network errors; stop on other 4xx
- give every request a time limit, and cap both the retries and the waits
- save by the vendor's call ID so running it twice changes nothing
- record progress only after a full, successful run
- log start, end, pages, records, and failures. Never log the key.

Write tests first, against a fake API that sends two pages,
a 429, a 500, a 401, and the same call twice.
Do not touch the real API until I say so.

You don't need to know how to code any line of that. You need to know it has to be there.

Build in This Order

  1. One record. Look at it next to the vendor's own screen.
  2. One day. Count it against the vendor's own report.
  3. Break it on purpose. The next two lessons.
  4. Full history. Only after the first three pass.

Put it in version control before step 1, so you can see every change AI makes. GIT 101 covers that.

QUIZ

What should you do right after one record looks right?

Sign in to track lesson progress and earn a certificate.SIGN IN TO SAVE PROGRESS