get_field_map Database
Retrieve a field map and its entries for review
Overview
Fetches a field map and all of its mapping entries so you can review the LLM-generated mappings before confirming, rejecting, or applying corrections. Returns the full field map metadata (status, source file, target platform, model used) plus every individual field mapping entry with its source field, target entity/column, transformation, LLM reasoning, and confidence level.
How It Works
- Validates that the job belongs to the authenticated user.
- Looks up the field map by ID and verifies it belongs to the specified job.
- Loads all field map entries associated with the map.
- Returns the complete field map object with entries in a single response.
Input Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
job_id |
string |
required | Clone job ID |
field_map_id |
string |
required | ID of the field map to retrieve |
What You Get Back
- Field map metadata: id, status (running/queued/draft/confirmed/rejected/failed), source_file_id, target_platform_id, model_used, error_message (when failed), timestamps
- poll_hint (when running/queued/failed): a short guidance string telling the calling agent what to do next
- Array of field map entries with source_field, target_entity, target_column, transformation, llm_reasoning, confidence, and is_user_override flag — populated only when status is draft/confirmed/rejected
Example Use Case
After running map_source_database_to_target, call get_field_map to review every mapping the LLM generated. Check the confidence levels and reasoning — low-confidence fields may need corrections via confirm_field_map before proceeding to seed script generation.
Tips
This is also the POLL endpoint for map_source_database_to_target. While status is 'running' or 'queued', poll again every 5-10s — do NOT re-call the kickoff.
On status='failed', read the error_message field before deciding whether to retry the kickoff.
Always review the field map before confirming — the LLM may misinterpret ambiguous source fields.
Look for low-confidence entries that may need manual corrections.
Use the entry IDs from this response when submitting corrections via confirm_field_map.
