get_field_map_status Database

Poll the pipeline-run state of the background database field mapping step

Overview

Inspects the underlying pipeline-run state of the background `database_field_map_async` step that backs `map_source_database_to_target`. Returns the run status (queued | running | completed | error | interrupted) along with timing information. When status is 'completed', also returns the resulting field_map_id and its current draft/confirmed status so you can proceed to confirm_field_map or generate_database_seed_script. For most callers, get_field_map is the simpler poll endpoint; use this tool when you want to inspect the pipeline run itself — timing, error category, run number.

How It Works

  1. Validates that the clone job belongs to the authenticated user.
  2. Looks up the pipeline step run for `database_field_map_async` on this job — either the most recent run or a specific run_number if provided.
  3. Maps the raw DB row into a human-readable status: queued (not yet started), running (in progress), completed (finished without error), error (failed), or interrupted (stuck/crashed).
  4. process_restart rows (redeploy/SIGTERM) are surfaced as 'queued' so polling clients don't see a spurious error after a routine restart.
  5. When status is 'completed', queries database_mapping_field_map for the resulting field_map_id and its current status (draft/confirmed).

Input Parameters

ParameterTypeRequiredDescription
job_id string required Clone job ID passed to map_source_database_to_target
source_file_id string required Same source_file_id that was passed to map_source_database_to_target
target string required Same target platform ID that was passed to map_source_database_to_target
run_number number optional Optional pipeline run_number. If omitted, the most recent run of database_field_map_async for this job is checked.

What You Get Back

Example Use Case

After calling map_source_database_to_target, an agent polls get_field_map_status every 10 seconds. The first two polls return status='running'. The third returns status='completed' with field_map_id and field_map_status='draft', so the agent switches to get_field_map to review the mapping entries.

Tips

For simple polling, prefer get_field_map — it returns the mapping entries directly once the run completes.
Use this tool when you need pipeline-level detail: run timing, error_category, or a specific run_number.
process_restart status appears as 'queued' — this is expected after a server redeploy and the run will resume automatically.
status='interrupted' means the run was genuinely stuck (not a routine restart) — check error_message and consider retrying the kickoff.
Pass run_number to inspect a specific historical run rather than the most recent one.

Related Tools