Skip to main content

Consume Extracted Data

Once RAISE processes a resume, the extracted candidate profile is available in one or both output destinations depending on your OUTPUT_TARGET configuration:

  • SQS Output Queue (CVExtractorQueue) — for event-driven downstream consumers
  • DynamoDB Table (CVExtractorTable) — for direct querying and analysis

SQS Message Schema

Every message published to the output queue follows the CandidateProfileCreated schema. See the Candidate Profile Schema page for the full field reference. A representative example is shown below:

{
"id": "uuid",
"fileName": "resumes/john-doe.pdf",
"timestamp": "2026-03-15T10:00:00.000Z",
"analysisResult": {
"candidateProfile": {
"fullName": "Jane Doe",
"email": "jane.doe@example.com",
"phoneNumber": "+27 82 123 4567",
"location": "Cape Town, South Africa",
"professionalSummary": "...",
"workExperience": [
{
"companyName": "Acme Corp",
"position": "Software Engineer",
"startDate": "2020-01",
"endDate": "2024-12",
"isCurrentPosition": false,
"responsibilities": ["Built APIs", "Led team of 3"]
}
],
"education": [
{
"institution": "University of Cape Town",
"qualification": "BSc Computer Science",
"fieldOfStudy": "Computer Science",
"year": "2019"
}
],
"skills": [{ "skill": "TypeScript" }, { "skill": "AWS" }],
"certifications": [{ "certification": "AWS Solutions Architect", "year": "2022" }]
}
}
}

Consuming from SQS

import {
SQSClient,
ReceiveMessageCommand,
DeleteMessageCommand,
} from "@aws-sdk/client-sqs";

const client = new SQSClient({ region: "us-east-1" });
const queueUrl = "YOUR_OUTPUT_QUEUE_URL";

async function poll() {
while (true) {
const { Messages = [] } = await client.send(new ReceiveMessageCommand({
QueueUrl: queueUrl,
MaxNumberOfMessages: 10,
WaitTimeSeconds: 20, // long polling
}));

for (const message of Messages) {
const profile = JSON.parse(message.Body);
console.log("Received:", profile.analysisResult.candidateProfile.fullName);

// process the profile ...

await client.send(new DeleteMessageCommand({
QueueUrl: queueUrl,
ReceiptHandle: message.ReceiptHandle,
}));
}
}
}

poll();

Reading from DynamoDB

If OUTPUT_TARGET is DYNAMODB or BOTH, extracted profiles are stored in CVExtractorTable with id (UUID) as the partition key.

import { DynamoDBClient, ScanCommand, GetItemCommand } from "@aws-sdk/client-dynamodb";
import { unmarshall } from "@aws-sdk/util-dynamodb";

const client = new DynamoDBClient({ region: "us-east-1" });
const tableName = "YOUR_TABLE_NAME";

// Fetch a single profile by ID
async function getProfile(id) {
const { Item } = await client.send(new GetItemCommand({
TableName: tableName,
Key: { id: { S: id } },
}));
return Item ? unmarshall(Item) : null;
}

// Scan all profiles (use sparingly on large tables)
async function listProfiles() {
const { Items = [] } = await client.send(new ScanCommand({
TableName: tableName,
}));
return Items.map(unmarshall);
}