preview_query
Estimate the number of records that will be migrated and view a sample to verify your filter before running a full migration. Prevents migrating too many records by checking the scope first.
Instructions
Preview how many records will be migrated before committing to a full run. Returns the total record count and a sample (up to 5 records) matching the query. ALWAYS call this before run_test_migration or run_full_migration when the user wants to filter or scope the migration — e.g. "only migrate closed tickets" or "just the records from 2024". This prevents accidentally migrating too many records.
For Jira: filter is JQL (e.g. "status = Done AND created >= 2024-01-01") For Salesforce: filter is a SOQL WHERE clause (e.g. "Status = 'Closed' AND CreatedDate >= 2024-01-01T00:00:00Z")
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| platform | Yes | Source platform (jira or salesforce) | |
| object_name | Yes | Jira project key or Salesforce object name | |
| filter | No | JQL (Jira) or SOQL WHERE clause (Salesforce) to scope records | |
| fields | No | Specific fields to preview (defaults to key fields) |