pub struct DataMigrationRequest {
pub source_resource_path: String,
pub target_resource_path: String,
pub source_table: String,
pub target_table: String,
pub mapping: Vec<ColumnMapping>,
pub batch_size: Option<Option<i64>>,
pub conflict_mode: Option<ConflictMode>,
pub resume_run_id: Option<Option<i64>>,
pub definition_path: Option<Option<String>>,
}Expand description
DataMigrationRequest : Body shared by dry_run and run – run executes exactly what dry_run would preview for the same request.
Fields§
§source_resource_path: StringPath of a resource the caller can read (RLS-bound, #1404 – not merely one that exists in the workspace). Which connector opens it is derived from that resource’s resource_type (#1419); there is deliberately no store-kind field on this body. A tagged field would be a second source of truth that can disagree with the resource it names, and the resolver has to fetch the resource anyway. A resource_type with no connector in this build is a 400 naming it, never a silent attempt to open it as Postgres. Supported today: postgresql, and mysql – which serves MySQL and MariaDB alike (#1217/#1461: one resource type, one driver, one connector), on builds carrying the mysql cargo feature. File/object sources (#1218) and MongoDB (#1219) each add one, and a client that hard-codes the list will drift – the supported set is per-build, not per-version, and the 400’s message enumerates what the instance it is talking to actually supports.
target_resource_path: StringAs source_resource_path, but the connector must also be usable as a target. The two are dispatched separately: a source-only connector (MongoDB is one – store_mongo reads documents and does not write them) resolves fine as a source and is refused here. dry_run applies the same check, so a preview never greenlights a run against a connection this build could not write to.
source_table: String§target_table: String§mapping: Vec<ColumnMapping>§batch_size: Option<Option<i64>>Rows fetched from the source and inserted into the target per round-trip. Defaults to 1000 when omitted; rejected with 400 if it exceeds the hard ceiling of 10000 (a batch is materialized in memory in a single round-trip).
conflict_mode: Option<ConflictMode>§resume_run_id: Option<Option<i64>>run only. Id of an interrupted data_migration_run to continue from its checkpoint instead of starting a new run. The run that cannot be safely continued is a 400 naming the reason, never a silent restart from the beginning.
definition_path: Option<Option<String>>path of the saved data_migration definition this run came from (#1220), recorded on the run row. Purely a label: the config that runs is the one in this body, and nothing is read back out of the definition – a run must never execute a mapping different from the one its caller sent. Omit it for a one-off run, which stays fully supported.
Implementations§
Source§impl DataMigrationRequest
impl DataMigrationRequest
Sourcepub fn new(
source_resource_path: String,
target_resource_path: String,
source_table: String,
target_table: String,
mapping: Vec<ColumnMapping>,
) -> DataMigrationRequest
pub fn new( source_resource_path: String, target_resource_path: String, source_table: String, target_table: String, mapping: Vec<ColumnMapping>, ) -> DataMigrationRequest
Body shared by dry_run and run – run executes exactly what dry_run would preview for the same request.
Trait Implementations§
Source§impl Clone for DataMigrationRequest
impl Clone for DataMigrationRequest
Source§fn clone(&self) -> DataMigrationRequest
fn clone(&self) -> DataMigrationRequest
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more