To call an API and extract data.
Assume the API response data has already been staged in the api_records table. Write a SQL query to return only successfully extracted records that contain a value.
record_id, endpoint, record_key, record_value, extracted_atextracted_at ascending, then record_id ascending| Column | Type | Description |
|---|---|---|
| record_idPK | INT | Unique identifier for the staged API record |
| endpoint | VARCHAR(255) | API endpoint that produced the record |
| response_status | VARCHAR(20) | Processing status of the API response |
| record_key | VARCHAR(100) | Key identifying the extracted field |
| record_value | TEXT | Value extracted from the API response |
| extracted_at | TIMESTAMP | Timestamp when the API record was staged |